[Product-Developers] collective.recipe.backup: confused about names of snapshot files

Maurits van Rees m.van.rees at zestsoftware.nl
Wed Mar 28 12:09:23 UTC 2012


Op 23-03-12 14:25, Maarten Nieber schreef:
> Hi,
>
> when you create a snapshot backup with bin/snapshotbackup, it adds new backup
> files of the filestorage to var/snapshotbackups (e.g. 2012-03-23-12-47-20.dat,
> 2012-03-23-12-47-21.index, 2012-03-23-12-47-20.fsz) and to
> var/blobstoragesnapshots (e.g. blobstorage.0).
>
> Now I would like to restore a backup (for a certain date) that resides on the
> production server on my local machine, but I do not know which files to pick.
>
> More concretely, my questions are:
>
> - why is the date not included in filenames in var/blobstoragesnapshots?

The recipe saves disk space (and time) by using the rsync command with 
hardlinks for the blobs.  That
is much easier to do with a simple 0, 1, etc, as the command is 
something like this:

   rsync -a --delete --link-dest=../blobstorage.1 
blobstorage/backups/blobstorage.0

> - how does bin/snapshotrestore couple files in var/snapshotbackups with a
> corresponding file in var/blobstoragesnapshots?

By default it simple takes the latest backup.

When you specify a date, this is passed to the repozo command for 
restoring the filestorage. For the
blobstorage we use that date to search for the blob directory that has 
been modified at that date (or the
most recent one after that).

> - how can I (as a human being) know which files in var/snapshotbackups go with
> which file in var/blobstoragesnapshots?

Determine the date of the snapshotbackup as is visible in the file name. 
  Note that this is always GMT
time.  Find the blobstoragesnapshot directory that has been modified at 
that date or slightly later.

When in doubt: pick a more recent blob backup (or simply the latest 
one), as that will just contain a few
extra blobs, which is okay.  This may not work, or work less well, when 
you have meanwhile done a
zeopack.

> - if I copy the right backup files from the production server to the
> corresponding backup-folders on my local machine, restoring the backup for a
> certain date will just work?

Yes, that should work just fine.

> Thanks,
> Maarten

You're welcome,

-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl



More information about the Product-Developers mailing list