backup www directory
This commit is contained in:
parent
a0d693cc5f
commit
b2d27a915e
|
@ -97,7 +97,7 @@ function backup_local_radicale {
|
|||
function_check backup_directory_to_usb
|
||||
backup_directory_to_usb $source_directory $dest_directory
|
||||
fi
|
||||
source_directory=/var/www/radicale/collections
|
||||
source_directory=/var/www/radicale
|
||||
if [ -d $source_directory ]; then
|
||||
dest_directory=radicalecollections
|
||||
function_check backup_directory_to_usb
|
||||
|
@ -120,7 +120,7 @@ function restore_local_radicale {
|
|||
|
||||
temp_restore_dir=/root/tempradicalecollections
|
||||
restore_directory_from_usb $temp_restore_dir radicalecollections
|
||||
cp -r $temp_restore_dir/var/www/radicale/collections/* /var/www/radicale/collections
|
||||
cp -r $temp_restore_dir/var/www/radicale/* /var/www/radicale
|
||||
if [ ! "$?" = "0" ]; then
|
||||
function_check backup_unmount_drive
|
||||
backup_unmount_drive
|
||||
|
@ -137,7 +137,7 @@ function backup_remote_radicale {
|
|||
if [ -d ${RADICALE_DIRECTORY} ]; then
|
||||
echo $"Backing up the radicale settings"
|
||||
backup_directory_to_friend ${RADICALE_DIRECTORY} radicale
|
||||
backup_directory_to_friend /var/www/radicale/collections radicalecollections
|
||||
backup_directory_to_friend /var/www/radicale radicalecollections
|
||||
echo $"Backup of radicale settings complete"
|
||||
fi
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ function restore_remote_radicale {
|
|||
|
||||
temp_restore_dir=/root/tempradicalecollections
|
||||
restore_directory_from_friend $temp_restore_dir radicalecollections
|
||||
cp -r $temp_restore_dir/var/www/radicale/collections/* /var/www/radicale/collections
|
||||
cp -r $temp_restore_dir/var/www/radicale/* /var/www/radicale
|
||||
if [ ! "$?" = "0" ]; then
|
||||
exit 3674284
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue