a question of backup
Gustav H Meyer
gustav at gcis.gov.za
Mon Feb 27 11:35:31 UTC 2006
Hi Gabriel,
On 27/02/06 11:36, Gabriel Dragffy wrote:
> Hi thanks for the reply, can I use this script locally not for ssh? To copy
> from my /hom (an internal partition) to my USB Drive? /media/sdb1 (I think)?
In that case you don't have to write a script but just do the
following on the CLI (commandline):
1. Mount the usb drive (if not mounted already)
$ mount /media/sdb1
2. Mirror files to the usb drive
$ rsync -av --delete /hom /media/sdb1
3. Unmount the usb drive
$ umount /media/sdb1
PLEASE NOTE: This would synchronize the destination directory with
the source directory and you will not be able to restore historical
data. To get rsync to make proper backups do the following:
$ DSTAMP=`date '+%Y%m%d'`;rsync -avb --delete --backup-dir
/media/sdb1/backups/$DSTAMP /hom /media/sdb1/mirror
See also:
$ man rsync
or
$ rsync --help
Regards,
Gustav H Meyer
More information about the kubuntu-users
mailing list