BackupPC-users

[BackupPC-users] a slightly different question about rsync for offsite backups

2009-12-09 14:00:10
Subject: [BackupPC-users] a slightly different question about rsync for offsite backups
From: Omid <backuppc AT omidia DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 9 Dec 2009 10:57:13 -0800
so this is a slightly different question about crontabing rsync backups to an external usb drives.  i know this isn't strictly a backuppc question, but...

the idea is to schedule an rsync command to an external drive say every wednesday morning at 3 am, instruct the office to plug the drive in on tuesday, and to replace it on thursday with next week's drive.

i have the rsync command down pat.  i'm using:

rsync -aHPp /data/ /mnt/usb/data/

i've realized that the trailing backslash is important <smile>.  to be consistent anyways.

i've gotten the cronjob down pat, including the mount, stop and umount commands.  what i'm having problems with is this.

if the usb drive does not mount for whatever reason (either because it hasn't been plugged in, or for another reason), the copy is going to go to the folder that's there, which is going to fill up the native drive very quickly.

how can i avoid this?

i've tried the --no-dir command in rsync, hoping that it would prevent rsync from happening if the destination folder doesn't exist.  but it doesn't seem to work.

the only other option i seem to have is to create a script that confirms that the mount has occurred before executing the rsync script.  got any idea's?

thanks!!
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/