1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/laverna_ynh.git synced 2024-09-03 19:36:06 +02:00
laverna_ynh/scripts/backup

45 lines
1.3 KiB
Text
Raw Normal View History

2014-11-04 09:47:50 +01:00
#!/bin/bash
2020-11-05 20:59:46 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
2020-11-05 21:05:02 +01:00
ynh_print_info --message="Backing up Laverna..."
app=$YNH_APP_INSTANCE_NAME
2014-11-04 09:47:50 +01:00
2020-11-05 20:59:46 +01:00
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# END OF SCRIPT
#=================================================
2014-11-04 09:47:50 +01:00
2020-11-05 21:05:02 +01:00
ynh_print_info --message="Backup script completed for Laverna. (YunoHost will then actually copy those files to the archive)."