From: root Date: Fri, 3 Feb 2006 16:01:22 +0000 (+0000) Subject: Added sortet file list and chmod for files. X-Git-Url: https://git.sesse.net/?p=backup.sh;a=commitdiff_plain;h=fc9fd81bfb73ca25b5cbc2b06d45df000fbd1e72 Added sortet file list and chmod for files. --- diff --git a/backup-altersex.sh b/backup-altersex.sh index fbdc8da..2076523 100755 --- a/backup-altersex.sh +++ b/backup-altersex.sh @@ -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 +