You are not logged in.

#1 2011-10-06 19:47:10

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Recover after rsync

Hello,

By mistake I run a rsync backup command on the wrong partition for a couple of seconds. But that was enough to delete a huge amount of data.

Is there any chance to restore them?

Please say yes...

Regards

Offline

#2 2011-10-06 20:59:53

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Recover after rsync

1. From your backups....you have them, riiiighht? :-)
2. testdisk/photorec (testdisk is in [extra])

In the future, don't forget the --dry-run option for rsync!

Scott

Last edited by firecat53 (2011-10-06 21:00:08)

Offline

#3 2011-10-06 22:37:24

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Recover after rsync

If you didn't write anything to the partition yet after you inadvertently deleted stuff, it should be possible. If it's ext{3,4} then try extundelete (in the repos).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2011-10-06 23:30:59

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Recover after rsync

Thanks for your replies. Yet there is hope.

To 1. I just wanted to make a new backup as the last one was pretty old... I definitely will consider a cron job for that in the future as well as a backup on one of the cloud services.

2. Isn't test disk for partition recovery only? I mean, I didn't lose my partition, just the data on it. But thanks I will consider photorec.

3. I immediately unmounted the partition after I had stopped the rsync process. Luckily it is an ext3 drive. Will try extundelete as well.

Furthermore I made a full backup of my partition using partimage. That way I should be able to try several things in case I should lose even more data.

But still open for other suggestions, thanks!

Offline

#5 2011-10-10 18:25:03

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Recover after rsync

I tried extundelete and photorec. The first one is more appropriate because it restores whole directories instead of only cryptic named files without proper file name extension, which is the case for photorec.

However, not all my data is restored yet. Using extundelete I get a lot of messages that certain files couldn't be restored.

Are there any improvements possible with extundelete?

I just used the command extundelete --restore-all /dev/sdaX

Or any other programs that restore the files with their proper name and file name extension together with the directory in which they have been stored?

Last edited by orschiro (2011-10-10 18:25:29)

Offline

Board footer

Powered by FluxBB