]> git.sesse.net Git - backup.sh/commitdiff
Added sortet file list and chmod for files.
authorroot <empty>
Fri, 3 Feb 2006 16:01:22 +0000 (16:01 +0000)
committerroot <empty>
Fri, 3 Feb 2006 16:01:22 +0000 (16:01 +0000)
backup-altersex.sh

index fbdc8dabefc2c32edae755b908a251a2c7790462..2076523686a1574a28db20c89626ae15038572c7 100755 (executable)
@@ -13,6 +13,17 @@ NAME=$( date "+%Y%m%d%H%M" )
 
 cd /backup/altersex/_export/full
 
+#TODO fix --exclued "hack" that prevents backup of export/nx-chroot/tmp due to socket errors
+# mulig fix er: | grep -v ": socket ignored" | grep -v "tar: Removing leading `/'"
 ssh root@altersex.samfundet.no tar -cf - --one-file-system --exclude=export/debian --exclude=export/progdist --exclude=export/scratch --exclude=export/nx-chroot/tmp /export > $NAME.tar
+
+#make filelist
 tar tvvf $NAME.tar > $NAME.idx
 
+#make a sortet filelist
+grep -v ^d $NAME.idx | sort -n -r +2  > $NAME.sdx
+
+#fix perm
+chmod 600 *tgz                      #only for us
+chmod 644 *sdx *idx 2>/dev/null     #everyone can read
+