--timeout is about network connection timeouts. You aren't using the network so it doesn't apply at all. Even if you were networking an unmounted filesystem is an empty directory as far as rsync is concerned and rsync would treat it that way with no idea that you intended to have something mounted there.
Now, I see at the top of your script you check for the existence of the target directory. If that isn't the root of a filesystem then you are good because you are already checking for that. If it is the root of the filesystem then it will exist either as an empty directory or a mount point and you need to check for those possibilities. On 09/11/2018 12:28 PM, Chris via rsync wrote: > I have a script that runs nightly as a cronjob to backup my drive to a > USB drive https://pastebin.com/yivqrGUC On the command line I use the > --timeout option. Is this sufficient to ensure that if the external > drive somehow becomes unmounted that rsync will gracefully fail without > trying to write to the hard drive instead of the USB drive? > > rsync -vaWSHpl --timeout=15 --delete-excluded --filter "merge > ${EXC_FILE}" / "${BACKUP_DIR}" > /home/chris/rsyncbackup.log 2> > /home/chris/rsyncbackup.errors.log > > If this is sufficient or would it be better if I lowered the 'timeout' > to 5 seconds? > > Thanks for any suggestions/advice. > > Chris > > > -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Florida k...@sanitarium.net (personal) Web page: https://sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
signature.asc
Description: OpenPGP digital signature
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html