rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Backup of a backup


From: Mike Fleetwood
Subject: Re: [rdiff-backup-users] Backup of a backup
Date: Mon, 2 Jun 2014 18:11:05 +0100

On 1 June 2014 20:40, Greg Torrance <address@hidden> wrote:
> Hi all,
>
> What I would like to do for backups is the following: Rather than plug an
> external drive into my machine every day, I would like to do daily
> rdiff-backups to local storage (since I have more than enough). Then, once a
> week, I would like to backup that backup to an external drive.
>
> My original thought was to use rdiff-backup for the local backup, thereby
> allowing me to have incremental versions of files. And then, backp the
> rdiff-backup using to an external drive using, say, rsync.
>
> The problem I have is the following: Since I don't trust that file
> timestamps will be sufficient to determine whether or not a file has changed
> (since I have some large files that are updated with NO timestamp change), I
> would have to use rsync in the mode that hashes/checksums each file on the
> source and destination. And since the destination is an external drive, it
> will be extremely time-consuming, as it means fully reading every file
> across slow USB (before even attempting any updates).
>
> Do I understand correctly that rdiff-backup does hashes/checksums of every
> file?
>
> And do I understand correctly that it stores this information in the meta
> data, such that JUST the meta data needs to be read back from an external
> drive, thereby greatly increasing backup speed?
>
> If I am correct about the above assumptions, it seems that rdiff-backup
> might be a good option for both my local backup and the backup (of the local
> backup) to the external drive.
>
> However, at this point I'm unsure if an rdiff-backup of an rdiff-backup is
> even possible. Is it? How will it handle the backup of the meta data? Will
> the files conflict?
>
> A related question: Is there any way to have rdiff-backup create the meta
> data in a separate location from the actual files? It would seem that might
> be quite a useful option. Just curious.
>
> [I am running 1.2.8 on a Linux Mint machine.]
>
> I'd really appreciate any help or suggestions you can offer.
>
> Thanks,
> Greg

It is unusual for an application to deliberately restoring previous
mtime after writing to the file.  Testing rdiff-backup ...

Initial backup
# cd /var/tmp
# mkdir test
# echo foo > test/foo
# rdiff-backup test /mnt/1/backup-test
# zcat /mnt/1/backup-test/rdiff-backup-data/mirror_metadata.*.snapshot.gz
...
File foo
  Type reg
  Size 4
  SHA1Digest f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
  ModTime 1401728418
...

Change file without changing mtime
# touch -r test/foo ref
# echo bar > test/foo
# touch -r ref test/foo

Second backup
# rdiff-backup test /mnt/1/backup-test
# zcat /mnt/1/backup-test/rdiff-backup-data/mirror_metadata.*.snapshot.gz
...
File foo
  Type reg
  Size 4
  SHA1Digest f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
  ModTime 1401728418
...
# cat test/foo
bar
# cat /mnt/1/backup-test/foo
foo
# rdiff-backup --compare-full test /mnt/1/backup-test
metadata the same, data changed: foo
# echo $?
1

This looks like rdiff-backup is using mtime to determine if the source
files have changed and need to be backed up or not.

Whatever you decide make sure you test backup and restore in your scenario.

Thanks,
Mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]