Welcome! » Log In » Create A New Profile

Restore while backing up

Posted by Anonymous 
Restore while backing up
July 11, 2016 05:07AM
I doubt I'm the first to run into this, but google didn't help...

I tried to restore a whole directoy to /tmp and I got this error message:

"Fatal Error: It appears that a previous rdiff-backup session with process id 17597 is still running. If two different rdiff-backup processes write the same repository simultaneously, data corruption will probably result. To proceed with regress anyway, rerun rdiff-backup with the --force option."

So first off, as far as I know, restoring something does not involve a "write [to] the same repository". So I'm confused as to why this error message says so.

I'm tempted by the --force, but just for safety I look at the man page beforehand.

"--force
Authorize a more drastic modification of a directory than usual (for instance, when overwriting of a destination path, or when removing
multiple sessions with --remove-older-than). rdiff-backup will generally tell you if it needs this. WARNING: You can cause data loss if
you mis-use this option. Furthermore, do NOT use this option when doing a restore, as it will DELETE FILES, unless you absolutely know
what you are doing."

Not only do I find a complete contradiction of what I was told two seconds ago (ie. don't use --force), it again refers to restores that write files...

Can someone clear up my confusion? Can I restore files while a backup is happening and if yes, how do I do that safely?

[b]Laurent De Buyst[/b]
System administrator
[url=Arial][b]Disclaimer[/b][/url] | Please consider the environment before printing
Restore while backing up
July 11, 2016 08:47AM
The error doesn't say they will write to the same repository, it says "if" they do, data will be corrupted. It can only see that another process is running, it doesn't know that you are targeting a different destination. 

And - restores do write files, to the place where you are restoring them to. It doesn't know that you are restoring to a different directory and the warning is generic. A restore is a read only operation on the source repo as long as you are restoring to another place. That said, like any file copy operation it may read lock certain files and if the backup in progress tries to update those, it will fail. So you are risking an interruption of the current backup but I would say you are not risking data corruption. Best to wait if possible. 

On Mon, Jul 11, 2016 at 8:07 AM Laurent De Buyst <Laurent.DeBuyst < at > fedasil.be ([email]Laurent.DeBuyst < at > fedasil.be[/email])> wrote:

[quote]I doubt I&#39;m the first to run into this, but google didn&#39;t help...

I tried to restore a whole directoy to /tmp and I got this error message:

"Fatal Error: It appears that a previous rdiff-backup session with process id 17597 is still running.  If two different rdiff-backup processes write the same repository simultaneously, data corruption will probably result.  To proceed with regress anyway, rerun rdiff-backup with the --force option."

So first off, as far as I know, restoring something does not involve a "write [to] the same repository". So I&#39;m confused as to why this error message says so.

I&#39;m tempted by the --force, but just for safety I look at the man page beforehand.

"--force
              Authorize a more drastic modification of a directory than usual (for instance, when overwriting of a destination  path,  or  when  removing
              multiple  sessions  with --remove-older-than).  rdiff-backup will generally tell you if it needs this.  WARNING: You can cause data loss if
              you mis-use this option.  Furthermore, do NOT use this option when doing a restore, as it will DELETE FILES,  unless  you  absolutely  know
              what you are doing."

Not only do I find a complete contradiction of what I was told two seconds ago (ie. don&#39;t use --force), it again refers to restores that write files...

Can someone clear up my confusion? Can I restore files while a backup is happening and if yes, how do I do that safely?

[b]Laurent De Buyst[/b]
System administrator
[url=http://fedasil.be/fr/content/disclaimer][b]Disclaimer[/b][/url] | Please consider the environment before printing_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org ([email]rdiff-backup-users < at > nongnu.org[/email])
[url=https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users]https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users[/url]
Wiki URL: [url=http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki]http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki[/url][/quote]
Restore while backing up
July 11, 2016 10:29AM
On 07/11/2016 07:06 AM, Laurent De Buyst wrote:
[quote]"Fatal Error: It appears that a previous rdiff-backup session with
process id 17597 is still running. If two different rdiff-backup
processes write the same repository simultaneously, data corruption will
probably result. To proceed with regress anyway, rerun rdiff-backup
with the --force option."
[/quote]
While your backup session is running, the repository is in an
inconsistent state with _two_ current_mirror files in the
rdiff-backup-data directory. That is also the state when a backup
session has failed. rdiff-backup needs to regress the "failed" backup to
put the repository back into a clean state. Doing that while a backup
session is still running would probably be fatal to your repository and
could never be repaired.

If all you are interested in is the most recent version of the files,
you can always just copy those from the mirror without running
rdiff-backup at all. With a backup session still running, you could of
course get some mix of new and old files depending on just where the
current backup session was currently working.

--
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
Sorry, only registered users may post in this forum.

Click here to login