Browse Source

Remote backup of configuration files

Bob Mottram 9 years ago
parent
commit
4cae6b24ce
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/freedombone-backup-remote

+ 10
- 0
src/freedombone-backup-remote View File

30
 
30
 
31
 PROJECT_NAME='freedombone'
31
 PROJECT_NAME='freedombone'
32
 COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
32
 COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
33
+CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg
33
 
34
 
34
 export TEXTDOMAIN=${PROJECT_NAME}-backup-remote
35
 export TEXTDOMAIN=${PROJECT_NAME}-backup-remote
35
 export TEXTDOMAINDIR="/usr/share/locale"
36
 export TEXTDOMAINDIR="/usr/share/locale"
118
     fi
119
     fi
119
 }
120
 }
120
 
121
 
122
+# configuration files
123
+echo $"Backing up ${PROJECT_NAME} configuration files"
124
+if [ ! -d /root/tempbackupconfig ]; then
125
+    mkdir -p /root/tempbackupconfig
126
+fi
127
+cp -f $CONFIG_FILE /root/tempbackupconfig
128
+cp -f $COMPLETION_FILE /root/tempbackupconfig
129
+backup_directory_to_friend /root/tempbackupconfig config
130
+
121
 # Backup user files
131
 # Backup user files
122
 for d in /home/*/ ; do
132
 for d in /home/*/ ; do
123
     USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
133
     USERNAME=$(echo "$d" | awk -F '/' '{print $3}')