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,6 +30,7 @@
30 30
 
31 31
 PROJECT_NAME='freedombone'
32 32
 COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
33
+CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg
33 34
 
34 35
 export TEXTDOMAIN=${PROJECT_NAME}-backup-remote
35 36
 export TEXTDOMAINDIR="/usr/share/locale"
@@ -118,6 +119,15 @@ function backup_database_to_friend {
118 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 131
 # Backup user files
122 132
 for d in /home/*/ ; do
123 133
     USERNAME=$(echo "$d" | awk -F '/' '{print $3}')