[PC-BSD Commits] r6504 - pcbsd/trunk/pc-sysinstall/backend-query
svn at pcbsd.org
svn at pcbsd.org
Mon Apr 5 09:01:18 PDT 2010
Author: kris
Date: 2010-04-05 09:01:18 -0700 (Mon, 05 Apr 2010)
New Revision: 6504
Modified:
pcbsd/trunk/pc-sysinstall/backend-query/list-rsync-backups.sh
Log:
Updated the search feature for rsync backups, doesn't need life-preserver/ directory anymore
Modified: pcbsd/trunk/pc-sysinstall/backend-query/list-rsync-backups.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend-query/list-rsync-backups.sh 2010-04-05 14:21:18 UTC (rev 6503)
+++ pcbsd/trunk/pc-sysinstall/backend-query/list-rsync-backups.sh 2010-04-05 16:01:18 UTC (rev 6504)
@@ -14,19 +14,21 @@
exit 150
fi
-BACKDIR="life-preserver"
+# Look for full-system backups, needs at minimum a kernel to be bootable
+FINDCMD="find . -type d -maxdepth 6 -name 'kernel' | grep '/boot/kernel'"
# Get a listing of the number of full backups saved
-OLDBACKUPS=`ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} "cd ${BACKDIR}/ && ls -dt back-*"`
+OLDBACKUPS=`ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} "${FINDCMD}"`
if [ "$?" = "0" ]
then
for i in ${OLDBACKUPS}
do
+ BACKPATH="`echo ${i} | sed 's|/boot/.*||g' | sed 's|^./||g'`"
if [ -z "${BACKLIST}" ]
then
- BACKLIST="${i}"
+ BACKLIST="${BACKPATH}"
else
- BACKLIST="${BACKLIST}:${i}"
+ BACKLIST="${BACKLIST}:${BACKPATH}"
fi
done
More information about the Commits
mailing list