Bläddra i källkod

Make calling database backup to usb simpler

Bob Mottram 8 år sedan
förälder
incheckning
0b54cf5641
No account linked to committer's email

+ 617
- 618
src/freedombone-app-gnusocial
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 2
- 3
src/freedombone-app-gogs Visa fil

@@ -56,11 +56,10 @@ function backup_local_gogs {
56 56
 
57 57
 			echo $"Backing up gogs"
58 58
 
59
-			function_check backup_database_local
60
-			backup_database_local gogs
59
+			function_check backup_database_to_usb
60
+			backup_database_to_usb gogs
61 61
 
62 62
 			function_check backup_directory_to_usb
63
-			backup_directory_to_usb /root/tempgogsdata gogsdata
64 63
 			backup_directory_to_usb $GOPATH/src/github.com/gogits/gogs/custom gogs
65 64
 			backup_directory_to_usb /home/git/gogs-repositories gogsrepos
66 65
 			backup_directory_to_usb /home/git/.ssh gogsssh

+ 2
- 4
src/freedombone-app-hubzilla Visa fil

@@ -66,11 +66,9 @@ function backup_local_hubzilla {
66 66
 			HUBZILLA_DOMAIN_NAME='hubzilla'
67 67
 			HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
68 68
 
69
-			function_check backup_database_local
70
-			backup_database_local hubzilla
69
+			function_check backup_database_to_usb
70
+			backup_database_to_usb hubzilla
71 71
 
72
-			function_check backup_directory_to_usb
73
-			backup_directory_to_usb /root/temphubzilladata hubzilladata
74 72
 			backup_directory_to_usb /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs hubzilla
75 73
 
76 74
 			echo $"Hubzilla backup complete"

+ 2
- 4
src/freedombone-app-rss Visa fil

@@ -87,11 +87,9 @@ function backup_local_rss {
87 87
 
88 88
 			echo $"Backing up ttrss"
89 89
 
90
-			function_check backup_database_local
91
-			backup_database_local ttrss
90
+			function_check backup_database_to_usb
91
+			backup_database_to_usb ttrss
92 92
 
93
-			function_check backup_directory_to_usb
94
-			backup_directory_to_usb /root/tempttrssdata ttrssdata
95 93
 			backup_directory_to_usb /etc/share/tt-rss ttrss
96 94
 
97 95
 			echo $"ttrss backup complete"

+ 2
- 2
src/freedombone-app-searx Visa fil

@@ -64,11 +64,11 @@ function upgrade_searx {
64 64
 }
65 65
 
66 66
 function backup_local_searx {
67
-	echo ''
67
+	echo -n ''
68 68
 }
69 69
 
70 70
 function backup_remote_searx {
71
-	echo ''
71
+	echo -n ''
72 72
 }
73 73
 
74 74
 function remove_searx {

+ 3
- 3
src/freedombone-app-sip Visa fil

@@ -38,15 +38,15 @@ VOIP_TURN_TLS_PORT=5349
38 38
 VOIP_TURN_NONCE=
39 39
 
40 40
 function upgrade_sip {
41
-    echo ''
41
+    echo -n ''
42 42
 }
43 43
 
44 44
 function backup_local_sip {
45
-	echo ''
45
+	echo -n ''
46 46
 }
47 47
 
48 48
 function backup_remote_sip {
49
-	echo ''
49
+	echo -n ''
50 50
 }
51 51
 
52 52
 function remove_sip {

+ 3
- 3
src/freedombone-app-syncthing Visa fil

@@ -40,15 +40,15 @@ SYNCTHING_SHARED_DATA=/var/lib/syncthing/SyncShared
40 40
 SYNCTHING_USER_IDS_FILE='.syncthingids'
41 41
 
42 42
 function upgrade_syncthing {
43
-    echo ''
43
+    echo -n ''
44 44
 }
45 45
 
46 46
 function backup_local_syncthing {
47
-    echo ''
47
+    echo -n ''
48 48
 }
49 49
 
50 50
 function backup_remote_syncthing {
51
-    echo ''
51
+    echo -n ''
52 52
 }
53 53
 
54 54
 function remove_syncthing {

+ 6
- 0
src/freedombone-utils-backup Visa fil

@@ -261,4 +261,10 @@ function backup_directory_to_usb {
261 261
 	fi
262 262
 }
263 263
 
264
+function backup_database_to_usb {
265
+	database_name=$1
266
+	backup_database_local $database_name
267
+	backup_directory_to_usb /root/temp${database_name}data ${database_name}data
268
+}
269
+
264 270
 # NOTE: deliberately no exit 0