mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Minor backup/restore changes
This commit is contained in:
parent
736009bb82
commit
b30eafd9e8
2 changed files with 15 additions and 6 deletions
|
@ -33,24 +33,33 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
# N.B.: the following 'ynh_backup' calls are only a *declaration* of what needs
|
||||
# to be backuped and not an actual copy of any file. The actual backup that
|
||||
# creates and fill the archive with the files happens in the core after this
|
||||
# script is called. Hence ynh_backups calls takes basically 0 seconds to run
|
||||
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||
ynh_print_info --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/var/log/$app/error.log"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Netdata configuration directory..." --weight=1
|
||||
ynh_print_info --message="Backing up Netdata configuration directory..."
|
||||
|
||||
ynh_backup --src_path="$final_path/etc/netdata"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..." --weight=1
|
||||
ynh_print_info --message="Backing up nginx web server configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
|
@ -61,7 +70,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/var/log/$app/error.log"
|
||||
|
||||
|
@ -69,4 +78,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -24,7 +24,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue