X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=backup.sh;h=307a14f23aae338f15b76d4c795aa0823ccdd180;hb=040ea36adf3804e541e9973d88c2168da11e8eae;hp=22f4e97a679f33d9b6efffe4e504d8ab3d259815;hpb=8250e4965bd8e356055c3b470a00df138d5edfbb;p=backup.sh diff --git a/backup.sh b/backup.sh index 22f4e97..307a14f 100755 --- a/backup.sh +++ b/backup.sh @@ -68,9 +68,6 @@ echo `date`": Backup run starting" >&2 umask 027 -#selve backupen -# krever at noen variabler er satt -# krever at vi er i rett katalog backup() { @@ -133,7 +130,7 @@ backup() # Update timestamp echo $DATEs > ../.date && touch -t $DATE ../.date - # Make a sorted filelist as well + # Make a sorted file list as well sort -k6 < $DATE.idx > $DATE.sdx # Fix permissions @@ -214,7 +211,7 @@ backup() fi fi - # Try to run preexec if it exist + # Try to run preexec if it exists if ! ssh root@$computer "[ ! -f ~/.backup/preexec ] || /bin/bash -x ~/.backup/preexec" >&2; then echo `date`" $computer: Could not run $computer:~/.backup/preexec" die @@ -229,8 +226,6 @@ backup() # Prepare storage area mkdir -m 755 -p $storagedir/$computer/$sfilesystem/full 2>/dev/null mkdir -m 755 -p $storagedir/$computer/$sfilesystem/daglig 2>/dev/null - echo $filesystem > ${storagedir}/${computer}/.${sfilesystem}.name - chmod 644 ${storagedir}/${computer}/.${sfilesystem}.name # Default backuplevel backuplevel=daglig