]> git.sesse.net Git - backup.sh/commitdiff
litt komentarer
authorroot <empty>
Sat, 11 Nov 2000 12:13:02 +0000 (12:13 +0000)
committerroot <empty>
Sat, 11 Nov 2000 12:13:02 +0000 (12:13 +0000)
backup.sh

index 3244d75afd9e6d39bf1093948ff28b3e1a7198e7..d4ef98b57947a9315ac32490062c489bc9cd5b83 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -2,7 +2,6 @@
 
 #dirs
 confdir=/home/backup/conf/           #configuration files
-webdir=/home/backup/public_html      #web-pages
 storagedir=/backup                   #mountpoint of huge disc
 ###
 
@@ -35,7 +34,6 @@ unixcomputers=`cat $confdir/computers.unix`
 ###
 
 #disse bør kunne varieres fra fs til fs?
-#disse bør flyttes ut i egen fil som kan editeres fra web kanskje?
 maksantallfulle=2          #hvor mange fulle vi tar vare på
 dagermellomfulle=30        #antall dager før det er på tide med ny full
 logw=40
@@ -62,7 +60,7 @@ backup()
   forrigecmd=""
  fi
 
- #Prøver å ta backup med tar
+ #We try to run tar on the remote computer
  if `ssh $computer "cd $filesystem ;\
      tar cfl - . $forrigecmd \
       --exclude-from=/tmp/.backup/exclude \
@@ -71,7 +69,8 @@ backup()
  then
   #perhaps it did work
   mv $DATE.tmp $DATE.tgz
-  #make a filelist and update the datefile
+  #make a filelist.
+  #update the datefile if the filelist is ok.
   tar tvfz $DATE.tgz > $DATE.idx 2>&1 &&
     echo $DATEs > ../.date            &&
     touch -t $DATE ../.date
@@ -80,8 +79,8 @@ backup()
   grep -v ^d $DATE.idx | sort -n -r +2 > $DATE.sdx
 
   #fix perm
-  chmod 600 *tgz
-  chmod 644 *sdx *idx 2>/dev/null
+  chmod 600 *tgz                      #only for us
+  chmod 644 *sdx *idx 2>/dev/null     #everyone can read
 
  else
   #it did not work