From 7c008c914d56a388f8aaa402fb9d8cece928bebb Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 5 Dec 2017 14:50:17 +0100 Subject: [PATCH] Create rm-rf_star.md --- rm-rf_star.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 rm-rf_star.md diff --git a/rm-rf_star.md b/rm-rf_star.md new file mode 100644 index 0000000..ad158ef --- /dev/null +++ b/rm-rf_star.md @@ -0,0 +1,26 @@ +when you write rm -rf * on your home!!! +---------------------------------------- + + +1: Dump jour journal of your ext4 hdd (before stop computer) +``` +debugfs -R "dump <8> /PATH/journal.copy" /dev/DEVICE +``` + +2: Umount your partition + +3: Get the timestamp of the last time you want data history +``` +date -d "-3day" +%s +``` + +4: Create a new directory to store data +``` +mkdir your_folder +``` + +5: Extract data: +``` +ext4magic /dev/nvme0n1p5 -j /tmp/JOURNAL.copy -a `date -d "-3day" +%s` -M -d your_folder/ +``` +