BackupPC-users

Re: [BackupPC-users] Restore Files Newer Than Date

2011-06-07 22:51:25
Subject: Re: [BackupPC-users] Restore Files Newer Than Date
From: Holger Parplies <wbppc AT parplies DOT de>
To: Gene Cooper <gcooper AT sonoracomm DOT com>
Date: Wed, 8 Jun 2011 03:45:21 +0200
Hi,

Gene Cooper wrote on 2011-06-07 16:28:01 -0700 [[BackupPC-users] Restore Files 
Newer Than Date]:
> [...]
> I had a server fail today, but there was a full backup done last night. 
>  It's many gigabytes over a WAN connection.
> 
> I had a separate local-disk backup system, which I refer to as Level 1, 
> which I used to restore the server to 'the day before yesterday'.  But I 
> need to restore 'yesterday' from BackupPC over the WAN.
> [...]
> I can't help but think there is some clever command line that will do 
> this for me...

after writing a rather complicated reply I find myself wondering whether a
plain restore won't do just what you want, presuming the backup is configured
as an rsync(d) backup, which it almost certainly is. As you are using rsync as
the transfer method, you should be transferring only file deltas over the
WAN, though you'll probably be reading all files on both sides in the style of
a full backup.

Presuming that is, for some obscure reason, not the case, here are my original
thoughts:

If you've got enough space, you could do a local restore to a temporary
directory on the BackupPC server (or any other host on the BackupPC server's
local network) and then use rsync to transfer exactly the missing changes over
the WAN (remember the --delete options!). If you don't, you could restore only
the files changed after a certain time to a temporary directory on the BackupPC
server and then rsync that over (note that you won't be able to get rid of
files deleted yesterday, though, so you won't get *exactly* the state of the
last backup). That would be an invocation of BackupPC_tarCreate, piped into
tar with the '-N' option ('--newer=date'). If you don't have the disk space
even for that, you could play around with doing it on an sshfs mount of the
target host, though that will obviously lose any rsync savings for the files
you are restoring.
I don't know of any filter that would reduce a tar stream to only files newer
than a specific date (and remember, you want the deletions from yesterday,
too).

The first option [referring to the local restore + rsync] is both simpler and
less error-prone, so use that if [the plain restore doesn't do what you want
and] you have the space available. If you need help on the syntax of
BackupPC_tarCreate, feel free to ask.

Hope that helps.

Regards,
Holger

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>