qr_ynh/scripts/backup

18 lines
686 B
Plaintext
Raw Normal View History

2019-08-13 21:35:51 +02:00
#!/bin/bash
source /usr/share/yunohost/helpers
ynh_abort_if_errors
2022-03-03 17:58:37 +01:00
ynh_print_info --message="Loading installation settings..."
2019-08-13 21:35:51 +02:00
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
2022-03-03 17:58:37 +01:00
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
2019-08-13 21:35:51 +02:00
2022-03-03 17:58:37 +01:00
ynh_print_info --message="Declaring files to be backed up..."
2019-08-13 21:35:51 +02:00
ynh_backup --src_path="$final_path"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
2022-03-03 17:58:37 +01:00
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
2019-08-13 21:35:51 +02:00
2022-03-03 17:58:37 +01:00
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."