Backup and restore tahoelafs to usb
This commit is contained in:
parent
3856005b72
commit
0c842943f4
|
@ -108,13 +108,27 @@ function upgrade_tahoelafs {
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_local_tahoelafs {
|
function backup_local_tahoelafs {
|
||||||
echo -n ''
|
source_directory=/home/tahoelafs/.tahoe-introducer
|
||||||
# TODO
|
if [ ! -d $source_directory ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
systemctl stop tahoelafs
|
||||||
|
dest_directory=tahoelafs
|
||||||
|
function_check backup_directory_to_usb
|
||||||
|
backup_directory_to_usb $source_directory $dest_directory
|
||||||
|
echo $"Backup to $dest_directory complete"
|
||||||
|
systemctl start tahoelafs
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_local_tahoelafs {
|
function restore_local_tahoelafs {
|
||||||
echo -n ''
|
echo $"Restoring Tahoe-LAFS introducer"
|
||||||
# TODO
|
systemctl stop tahoelafs
|
||||||
|
temp_restore_dir=/root/temptahoelafs
|
||||||
|
restore_directory_from_usb $temp_restore_dir tahoelafs
|
||||||
|
rm -rf /home/tahoelafs/.tahoe-introducer
|
||||||
|
cp -r $temp_restore_dir/home/tahoelafs/.tahoe-introducer /home/tahoelafs/
|
||||||
|
chown -R tahoelafs:tahoelafs /home/tahoelafs
|
||||||
|
systemctl start tahoelafs
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_remote_tahoelafs {
|
function backup_remote_tahoelafs {
|
||||||
|
|
Loading…
Reference in New Issue