Re: Questions with rsync

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/04/2009 12:53 AM, GMS S wrote:
> [
> Here's my full-system rsync backup script. It goes to an external USB drive.
> 
> #! /bin/sh
> cd /media/MyBookLX/sds-desk
> rm -fr backup.9
> mv backup.8 backup.9
> mv backup.7 backup.8
> mv backup.6 backup.7
> mv backup.5 backup.6
> mv backup.4 backup.5
> mv backup.3 backup.4
> mv backup.2 backup.3
> mv backup.1 backup.2
> cp -al backup backup.1
> 
> touch /last_backup_ts
> rsync -va --exclude-from /usr/local/bin/do-backup-excludes --delete /
> /media/MyBookLX/sds-desk/backup/
> 
> The exclude list is
> 
> /home/*/.gvfs/
> /home/*/.google/
> /home/*/.dbus/
> /home/*/.fonts/
> /proc
> /tmp
> /var/tmp
> /media
> /sys
> /dev
> 
> - --
> 
>   Steve
> ]
> 
> There are so many backup.1,backup.2,backup.3 ... files.Why?
> How did these files come?
> Did you create these 9 files in the external USB?
> 
> 
>       
> 

The beginning of the script rolls the last backup to backup1, the one
before that to backup2, etc.  This way, I keep 10 backup sets on the USB
drive.  They don't use much space, because "cp -al" uses hard links to
do the copies.  Therefore, a file that's in all backup sets takes up
only the space necessary to store it once.  This ties nicely with how
rsync does a delete.  When a file gets deleted from the new backup set
(or replaced with an updated copy), the old versions are not affected.

This guy explains it a lot better. It's where I got the script from.
http://www.mikerubel.org/computers/rsync_snapshots/



- --

  Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkonodcACgkQeERILVgMyvC69gCeKWLC+9ytaNKQxT16OESOpck5
xncAnjfBFUlE55H3uHNrBSMaXia6tOO4
=IUs1
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux