Dean S. Messing wrote:
It has been some time since I read the rsync man page.  I see that
there is (among the bazillion and one switches) a "--link-dest=DIR"
switch which I suppose does what you describe.  I'll have to
experiment with this and think things through.  Thanks, Michal.

Be aware that rsync is useful for making a *copy* of your files, which isn't always the best backup. If the goal is to preserve data and be able to recover in time of disaster, it's probably not optimal, while if you need frequent access to old or deleted files it's fine.

For example, full and incremental backup methods such as dump and restore are usually faster to take and restore than a copy, and allow easy incremental backups.

Consider:

   touch bkup_full_new
   timestamp=$(date +%Y%m%d-%T)
   find /home -depth | cpio -o -Hcrc |
      gzip -3 >/mnt/USBbkup/full-$timestamp &&
      mv -f bkup_full_new bkup_full && touch bkup_incr

Now you can do an incremental (since last full or incremental) or partial (since last full):

   touch bkup_incr_new
   timestamp=$(date +%Y%m%d-%T)
   find /home -cnewer bkup_incr | cpio -o -Hcrc |
      gzip -3 >/mnt/USBbkup/incr-$timestamp &&
      mv -f bkup_incr_new bkup_incr

   timestamp=$(date +%Y%m%d-%T)
   find /home -cnewer bkup_full  | cpio -o -Hcrc |
      gzip -3 >/mnt/USBbkup/part-$timestamp

The advantage of the incr is that files are smaller, the advantage of partial is that you only restore full+part (two total), and the advantage of rsync is that deleted files will really be deleted (that's why I say it a copy, not a backup).

Hope this is useful.

--
bill davidsen <[EMAIL PROTECTED]>
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to