[PC-BSD Commits] r4940 - pcbsd/trunk/lifePreserver/scripts

svn at pcbsd.org svn at pcbsd.org
Tue Nov 10 14:18:24 PST 2009


Author: kris
Date: 2009-11-10 14:18:24 -0800 (Tue, 10 Nov 2009)
New Revision: 4940

Modified:
   pcbsd/trunk/lifePreserver/scripts/backup-rsync.sh
Log:

Fixed a bug in rsync script, make sure we touch the finished backup dir before
doing any cleanup, in order to ensure we don't nuke it by mistake in case the
server time is ahead of the client



Modified: pcbsd/trunk/lifePreserver/scripts/backup-rsync.sh
===================================================================
--- pcbsd/trunk/lifePreserver/scripts/backup-rsync.sh	2009-11-10 21:54:07 UTC (rev 4939)
+++ pcbsd/trunk/lifePreserver/scripts/backup-rsync.sh	2009-11-10 22:18:24 UTC (rev 4940)
@@ -77,6 +77,7 @@
   / ${SSHHOST}:${BACKDIR}/incomplete_back-$DATE \
   && ssh -p ${PORT} ${SSHHOST} \
   "mv ${BACKDIR}/incomplete_back-$DATE ${BACKDIR}/back-$DATE \
+  && touch ${BACKDIR}/back-$DATE \
   && rm -f ${BACKDIR}/current \
   && ln -s back-${DATE} ${BACKDIR}/current"
 



More information about the Commits mailing list