Local backup for ipfs
This commit is contained in:
parent
7afd0e27a4
commit
a17c56f243
|
@ -47,11 +47,24 @@ function upgrade_ipfs {
|
|||
}
|
||||
|
||||
function backup_local_ipfs {
|
||||
echo ''
|
||||
if ! grep -q "Admin user" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
ADMIN_USERNAME=$(cat $COMPLETION_FILE | grep "Admin user" | awk -F ':' '{print $2}')
|
||||
source_directory=/home/$ADMIN_USERNAME/.ipfs
|
||||
if [ -d $source_directory ]; then
|
||||
dest_directory=ipfs
|
||||
echo $"Backing up $source_directory to $dest_directory"
|
||||
|
||||
function_check backup_directory_to_usb
|
||||
backup_directory_to_usb $source_directory $dest_directory
|
||||
|
||||
echo $"Backup to $dest_directory complete"
|
||||
fi
|
||||
}
|
||||
|
||||
function backup_remote_ipfs {
|
||||
echo ''
|
||||
echo -n ''
|
||||
}
|
||||
|
||||
function remove_ipfs {
|
||||
|
|
Loading…
Reference in New Issue