diff options
| author | yalh76 <yalh@yahoo.com> | 2019-03-18 04:22:38 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2019-03-18 04:22:38 +0100 |
| commit | f028b7f2afffd1fb60451a3d06ab861199268331 (patch) | |
| tree | 7a5ca060455b3866f1cd91398fd9e395c5c4dd29 /scripts/backup | |
| parent | cc4c8e73e6e62e888ff1a8793276e3e04e93a8bd (diff) | |
| download | mastodon_ynh-f028b7f2afffd1fb60451a3d06ab861199268331.tar.gz mastodon_ynh-f028b7f2afffd1fb60451a3d06ab861199268331.tar.bz2 mastodon_ynh-f028b7f2afffd1fb60451a3d06ab861199268331.zip | |
Apply example_ynh
Diffstat (limited to 'scripts/backup')
| -rw-r--r-- | scripts/backup | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/backup b/scripts/backup index eeee720..5e57cd7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -26,8 +26,8 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Loading installation settings..." -# Get multi-instances specific variables app=$YNH_APP_INSTANCE_NAME # Retrieve app settings @@ -47,18 +47,21 @@ yunohost service stop "$app-streaming" #================================================= # BACKUP THE APP MAIN DIR #================================================= +ynh_print_info "Backing up the main app directory..." ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= +ynh_print_info "Backing up nginx web server configuration..." ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# BACKUP THE MYSQL DATABASE +# BACKUP THE POSTGRESQL DATABASE #================================================= +ynh_print_info "Backing up the PostgreSQL database..." ynh_psql_dump_db "$db_name" > db.sql ynh_backup "db.sql" @@ -68,6 +71,7 @@ ynh_backup "db.sql" #================================================= # BACKUP SYSTEMD #================================================= +ynh_print_info "Backing up systemd configuration..." ynh_backup "/etc/systemd/system/$app-web.service" ynh_backup "/etc/systemd/system/$app-sidekiq.service" @@ -97,3 +101,9 @@ sleep 30 #================================================= systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." |
