On Friday 29 Aug 2003 18:08, Ernie Schroder wrote:
> On Friday 29 August 2003 06:21 am, Peter Ruskin wrote:
> > Hi Stephen,
> >
> > I obviously didn't make myself clear enough.
<snip>
> Peter,
> Your script looks like it might do the trick for me. I do have a
> couple of questions though. How would I adapt it for a remote backup
> location? /mnt/backup is a normally unmounted disk on my secondary
> Gentoo box. I have configured passwordless ssh between USER with sudo
> privledges on the machine to be backed up, to [EMAIL PROTECTED] The way
> to ssh in to the remote box, mount /mnt/backup and then do the rsync
> eludes me. I wonder if you might steer me in the right direction.
Sounds like a good idea Ernie. I'm afraid I've never done anything like
that though, so I can't offer any advice. I suppose you could use NFS,
with an fstab entry like:
remotebox:/mnt/backup /mnt/remote/mnt/backup nfs
user,noauto,rw,rsize=8192,wsize=8192,nolock 0 0
(all one line)
...and an entry in the remote box's /etc/exports like:
/mnt/backup 192.168.0.0/255.255.255.0(sync,insecure,no_root_squash,rw)
Then you wouldn't need to use ssh. (man exports(5))
> The second question is about the rsync command in your script. What
> does the --delete option do? Does it delete old backups? Forgive me
> for being a bit dense here, but I'm rather new at scripting.
The script makes a mirror of your system. If you delete any files, the
rsync "--delete" flag deletes those files on the backup next time it's
run; otherwise the backup would continually grow (man rsync). Downside
of this is that you only have the opportunity to recover accidentally
deleted files (one of the main reasons for having a backup, after all)
up to the next backup run. This isn't a problem for me because I have
another backup strategy using tar. I suppose you could alter the
script so that it only does the delete thing once a week, say.
if it's Sunday; then
rsync --progress --delete -av --exclude-from=$EXCLUDE / \
$BACKUP_TO/rsync/
else
rsync --progress -av --exclude-from=$EXCLUDE / \
$BACKUP_TO/rsync/
fi
Peter
--
======================================================================
Gentoo: Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
kernel-2.4.22_pre2-gss i686 AMD Athlon(tm) XP 1600+
======================================================================
--
[EMAIL PROTECTED] mailing list