SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Is there an easy way to discard the most recent backup?
Author Message
Post Is there an easy way to discard the most recent backup? 
Hi,

To make a long story short, I accidentally ran rdiff-backup against a
blank directory. Now my remote system has a blank mirror and the 1D
old increment contains the most recent copy of my data.

I'd like to restore from 1D ago rather than re-uploading my entire
backup set, but I would also like to preserve my increments. Is there
any way of doing that?

Ryan

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Is there an easy way to discard the most recent backup? 
On 06/08/2011 02:24 PM, Ryan J wrote:
Hi,

To make a long story short, I accidentally ran rdiff-backup against a
blank directory. Now my remote system has a blank mirror and the 1D
old increment contains the most recent copy of my data.

I'd like to restore from 1D ago rather than re-uploading my entire
backup set, but I would also like to preserve my increments. Is there
any way of doing that?

Yes, you can force rdiff-backup to do a regression of the most recent backup
just as it would do automatically if the most recent session had not run to
completion. Basically, within the rdiff-backup-data metadata directory you
create a second current_mirror.{timestamp}.data file with a timestamp that
matches the mirror_metadata file for the immediately preceding backup.

Dominic Raferd has written a script that will automate that and take care
of various "gotcha"s that can arise. It's attached to this message in
the mailing list archives:

<http://lists.nongnu.org/archive/html/rdiff-backup-users/2011-01/msg00030.html>

Here's a direct link to the attached script:

<http://lists.nongnu.org/archive/html/rdiff-backup-users/2011-01/txte4xgGumkmC.txt>

(Watch out for possible word wrap in those links.)

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Is there an easy way to discard the most recent backup? 
My apologies if this ends up hitting the list twice.  I don't think I
sent my first reply to the list and want to make sure it gets indexed
by Google just in case it's helpful to anyone else in the future.
Also, another link from Robert (for the sake of Google):
http://lists.nongnu.org/archive/html/rdiff-backup-users/2011-01/msg00030.html

Yes!  This is exactly what I was looking for.  Thank you very much.
You saved me a ton of hassle and I sincerely appreciate it.  I think
you may have been off by one increment in your example, but the
general idea is what I needed.  I'll include exactly what I did as an
extra example just in case anyone else ever has the same problem.


On my broken host....

# ls -l /backups/abydos/rdiff-backup-data/ | grep current
-rw------- 1 abydos abydos      10 Jun  8 02:25
current_mirror.2011-06-08T02:25:11-06:00.data

# rdiff-backup --list-increments /backups/abydos/
... snip ...
   increments.2011-06-06T17:58:46-06:00.dir   Mon Jun  6 17:58:46 2011
   increments.2011-06-07T09:48:48-06:00.dir   Tue Jun  7 09:48:48 2011
Current mirror: Wed Jun  8 02:25:11 2011

# sudo -u abydos touch
/backups/abydos/rdiff-backup-data/current_mirror.2011-06-07T09:48:48-06:00.data
# ls -l /backups/abydos/rdiff-backup-data/ | grep current
-rw-r--r-- 1 abydos abydos       0 Jun  8 16:45
current_mirror.2011-06-07T09:48:48-06:00.data
-rw------- 1 abydos abydos      10 Jun  8 02:25
current_mirror.2011-06-08T02:25:11-06:00.data


Now when the next backup runs, rdiff-backup sees two current_mirror
files.  Since the mirror for 2011-06-07T09:48:48-06:00 is still there,
rdiff-backup thinks the backup run at 2011-06-08T02:25:11-06:00 failed
(otherwise the older current_mirror file would have been removed).  It
reverts everything to the last known good state (which was the backup
from 2011-06-07T09:48:48-06:00) before performing a new backup.  My
backup of a blank directory on 2011-06-08T02:25:11-06:00 gets treated
like it failed, it gets removed and it's like it never happened.

My local mirror that I was testing on just finished running and it
worked perfectly!

Thanks again,
Ryan


On Wed, Jun 8, 2011 at 3:52 PM, Jean-Francois Rousseau <jf < at > techevo.ca> wrote:

Hi,

  Yes I have a trick for that.  You need to trick Rdiff-backup to think that last rdiff failed.

In order to do that go on you destination folder under rdiff-backup-data

you should have a file named something like : current_mirror.2011-06-08T17:40:27-04:00.data

create a similar file with previous backup; look for the name of the increment file in my case :

-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-05-30T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-05-31T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-01T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-02T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-03T00:01:07-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-04T00:01:04-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-05T00:01:07-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-06T00:01:07-04:00.dir   this is the previous sucessful backup
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-07T00:01:04-04:00.dir   this is my last backup ( in your case the one that messed everything )

in my case I would do :

touch current_mirror.2011-06-06T00:01:07-04:00.data

You should now have 2 file starting with current_mirror .... in that directory.

After that, do your backup the way you normaly do ( lauch rdiff-backup like usual )

If you are at the console you should see something like :

Previous backup seems to have failed, regressing destination now.

I will take a while depending how big was you backup set as it will uncompress everything from the .gz

After that you should be back on track !

Good luck !





_______________________________

   Jean-François Rousseau
    www.techevo.ca
     jf < at > techevo.ca
     514-447-9330


On Wed, Jun 8, 2011 at 3:24 PM, Ryan J <ryan+rdiff < at > jptech.ca> wrote:

Hi,

To make a long story short, I accidentally ran rdiff-backup against a
blank directory.  Now my remote system has a blank mirror and the 1D
old increment contains the most recent copy of my data.

I'd like to restore from 1D ago rather than re-uploading my entire
backup set, but I would also like to preserve my increments.  Is there
any way of doing that?

Ryan

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Is there an easy way to discard the most recent backup? 
My apologies if this ends up hitting the list twice. I don't think I
sent my first reply to the list and want to make sure it gets indexed
by Google just in case it's helpful to anyone else in the future.

Yes! This is exactly what I was looking for. Thank you very much.
You saved me a ton of hassle and I sincerely appreciate it. I think
you may have been off by one increment in your example, but the
general idea is what I needed. I'll include exactly what I did as an
extra example just in case anyone else ever has the same problem.


On my broken host....

# ls -l /backups/abydos/rdiff-backup-data/ | grep current
-rw------- 1 abydos abydos 10 Jun 8 02:25
current_mirror.2011-06-08T02:25:11-06:00.data

# rdiff-backup --list-increments /backups/abydos/
... snip ...
increments.2011-06-06T17:58:46-06:00.dir Mon Jun 6 17:58:46 2011
increments.2011-06-07T09:48:48-06:00.dir Tue Jun 7 09:48:48 2011
Current mirror: Wed Jun 8 02:25:11 2011

# sudo -u abydos touch
/backups/abydos/rdiff-backup-data/current_mirror.2011-06-07T09:48:48-06:00.data
# ls -l /backups/abydos/rdiff-backup-data/ | grep current
-rw-r--r-- 1 abydos abydos 0 Jun 8 16:45
current_mirror.2011-06-07T09:48:48-06:00.data
-rw------- 1 abydos abydos 10 Jun 8 02:25
current_mirror.2011-06-08T02:25:11-06:00.data


Now when the next backup runs, rdiff-backup sees two current_mirror
files. Since the mirror for 2011-06-07T09:48:48-06:00 is still there,
rdiff-backup thinks the backup run at 2011-06-08T02:25:11-06:00 failed
(otherwise the older current_mirror file would have been removed). It
reverts everything to the last known good state (which was the backup
from 2011-06-07T09:48:48-06:00) before performing a new backup. My
backup of a blank directory on 2011-06-08T02:25:11-06:00 gets treated
like it failed, it gets removed and it's like it never happened.

My local mirror that I was testing on just finished running and it
worked perfectly!

Thanks again,
Ryan


On Wed, Jun 8, 2011 at 3:52 PM, Jean-Francois Rousseau <jf < at > techevo.ca> wrote:

Hi,

  Yes I have a trick for that.  You need to trick Rdiff-backup to think that last rdiff failed.

In order to do that go on you destination folder under rdiff-backup-data

you should have a file named something like : current_mirror.2011-06-08T17:40:27-04:00.data

create a similar file with previous backup; look for the name of the increment file in my case :

-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-05-30T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-05-31T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-01T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-02T00:01:05-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-03T00:01:07-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-04T00:01:04-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-05T00:01:07-04:00.dir
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-06T00:01:07-04:00.dir   this is the previous sucessful backup
-rwxrwxrwx 1 jf jf     0 2011-04-12 14:44 increments.2011-06-07T00:01:04-04:00.dir   this is my last backup ( in your case the one that messed everything )

in my case I would do :

touch current_mirror.2011-06-06T00:01:07-04:00.data

You should now have 2 file starting with current_mirror .... in that directory.

After that, do your backup the way you normaly do ( lauch rdiff-backup like usual )

If you are at the console you should see something like :

Previous backup seems to have failed, regressing destination now.

I will take a while depending how big was you backup set as it will uncompress everything from the .gz

After that you should be back on track !

Good luck !





_______________________________

   Jean-François Rousseau
    www.techevo.ca
     jf < at > techevo.ca
     514-447-9330


On Wed, Jun 8, 2011 at 3:24 PM, Ryan J <ryan+rdiff < at > jptech.ca> wrote:

Hi,

To make a long story short, I accidentally ran rdiff-backup against a
blank directory.  Now my remote system has a blank mirror and the 1D
old increment contains the most recent copy of my data.

I'd like to restore from 1D ago rather than re-uploading my entire
backup set, but I would also like to preserve my increments.  Is there
any way of doing that?

Ryan

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB