|
@@ -108,13 +108,27 @@ function upgrade_tahoelafs {
|
108
|
108
|
}
|
109
|
109
|
|
110
|
110
|
function backup_local_tahoelafs {
|
111
|
|
- echo -n ''
|
112
|
|
- # TODO
|
|
111
|
+ source_directory=/home/tahoelafs/.tahoe-introducer
|
|
112
|
+ if [ ! -d $source_directory ]; then
|
|
113
|
+ return
|
|
114
|
+ fi
|
|
115
|
+ systemctl stop tahoelafs
|
|
116
|
+ dest_directory=tahoelafs
|
|
117
|
+ function_check backup_directory_to_usb
|
|
118
|
+ backup_directory_to_usb $source_directory $dest_directory
|
|
119
|
+ echo $"Backup to $dest_directory complete"
|
|
120
|
+ systemctl start tahoelafs
|
113
|
121
|
}
|
114
|
122
|
|
115
|
123
|
function restore_local_tahoelafs {
|
116
|
|
- echo -n ''
|
117
|
|
- # TODO
|
|
124
|
+ echo $"Restoring Tahoe-LAFS introducer"
|
|
125
|
+ systemctl stop tahoelafs
|
|
126
|
+ temp_restore_dir=/root/temptahoelafs
|
|
127
|
+ restore_directory_from_usb $temp_restore_dir tahoelafs
|
|
128
|
+ rm -rf /home/tahoelafs/.tahoe-introducer
|
|
129
|
+ cp -r $temp_restore_dir/home/tahoelafs/.tahoe-introducer /home/tahoelafs/
|
|
130
|
+ chown -R tahoelafs:tahoelafs /home/tahoelafs
|
|
131
|
+ systemctl start tahoelafs
|
118
|
132
|
}
|
119
|
133
|
|
120
|
134
|
function backup_remote_tahoelafs {
|