Backup and restore of akaunting
This commit is contained in:
parent
0c926f1b7a
commit
7658403fcc
|
@ -182,19 +182,55 @@ function upgrade_akaunting {
|
|||
|
||||
|
||||
function backup_local_akaunting {
|
||||
echo -n ''
|
||||
akaunting_path=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
||||
if [ -d $akaunting_path ]; then
|
||||
suspend_site ${AKAUNTING_DOMAIN_NAME}
|
||||
function_check backup_database_to_usb
|
||||
backup_database_to_usb akaunting
|
||||
backup_directory_to_usb $akaunting_path akaunting
|
||||
restart_site
|
||||
fi
|
||||
}
|
||||
|
||||
function restore_local_akaunting {
|
||||
echo -n ''
|
||||
temp_restore_dir=/root/tempakaunting
|
||||
akaunting_dir=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
||||
|
||||
suspend_site ${AKAUNTING_DOMAIN_NAME}
|
||||
|
||||
function_check akaunting_create_database
|
||||
akaunting_create_database
|
||||
|
||||
restore_database akaunting ${AKAUNTING_DOMAIN_NAME}
|
||||
chown www-data:www-data $akaunting_dir
|
||||
|
||||
restart_site
|
||||
}
|
||||
|
||||
function backup_remote_akaunting {
|
||||
echo -n ''
|
||||
akaunting_path=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
||||
if [ -d $akaunting_path ]; then
|
||||
suspend_site ${AKAUNTING_DOMAIN_NAME}
|
||||
function_check backup_database_to_friend
|
||||
backup_database_to_friend akaunting
|
||||
backup_directory_to_friend $akaunting_path akaunting
|
||||
restart_site
|
||||
fi
|
||||
}
|
||||
|
||||
function restore_remote_akaunting {
|
||||
echo -n ''
|
||||
temp_restore_dir=/root/tempakaunting
|
||||
akaunting_dir=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
||||
|
||||
suspend_site ${AKAUNTING_DOMAIN_NAME}
|
||||
|
||||
function_check akaunting_create_database
|
||||
akaunting_create_database
|
||||
|
||||
restore_database_from_friend akaunting ${AKAUNTING_DOMAIN_NAME}
|
||||
chown www-data:www-data $akaunting_dir
|
||||
|
||||
restart_site
|
||||
}
|
||||
|
||||
function remove_akaunting {
|
||||
|
|
Loading…
Reference in New Issue