Backup to spare drive (rsync / crontab)

Roland Smith rsmith at xs4all.nl
Fri Jan 30 11:22:11 PST 2009


On Fri, Jan 30, 2009 at 10:37:19AM -0800, drcubi at yahoo.com wrote:
> I am using rsync and crontab to perform scheduled backups on FreeBSD AMD64 Rel. 7.0
> I am following process described here for rsync :
> http://samba.anu.edu.au/rsync/examples.html
> 
> I have a backup script's created for daily, weekly, monthly.
> This is one example  -  the daily  (/backup is a seperate physical drive) :
> 
> #daily backup script
> rsync -a --delete /usr/home/data/Access/ /backup/daily/Access
> rsync -a --delete /usr/home/data/Templates/ /backup/daily/Templates
> rsync -a --delete /usr/home/QBdata/ /backup/daily/QBdata
> rsync -a --delete /usr/home/reception1/ /backup/daily/reception1
> rsync -a --delete /usr/home/reception2/ /backup/daily/reception2
> rsync -a --delete /usr/home/reception3/ /backup/daily/reception3
> rsync -a --delete /usr/home/data/Files/ /backup/daily/Files

If this is the complete script, you've forgotten to start the file with the
shell invocation:

#!/bin/sh
 
> All files created where chmod'd with +x, then I test the scripts by
> running them manually and all three, daily, weekly & monthly work
> fine.

Scripts started from the shell prompt will run without the #! line (they
will be interpreted by a subshell). 

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090130/bee3eac4/attachment.pgp


More information about the freebsd-questions mailing list