aboutsummaryrefslogtreecommitdiff
path: root/scripts/backup
diff options
context:
space:
mode:
authoreric_G <46165813+ericgaspar@users.noreply.github.com>2025-09-01 11:40:59 +0200
committereric_G <46165813+ericgaspar@users.noreply.github.com>2025-09-01 11:40:59 +0200
commitf153dc5aa68f66d3fabe39baa54f7fcdad8e3ebf (patch)
tree3ec47391ead537455cb4c613fc22654258a1d07c /scripts/backup
parent8d27dd88c49efc56bf983df313dc42af26c63a77 (diff)
parentedbf9871a19fd30634d86e7ff41d4f33b92521d4 (diff)
downloadmastodon_ynh-f153dc5aa68f66d3fabe39baa54f7fcdad8e3ebf.tar.gz
mastodon_ynh-f153dc5aa68f66d3fabe39baa54f7fcdad8e3ebf.tar.bz2
mastodon_ynh-f153dc5aa68f66d3fabe39baa54f7fcdad8e3ebf.zip
Merge branch 'testing' into pr/466
Diffstat (limited to 'scripts/backup')
-rw-r--r--scripts/backup31
1 files changed, 11 insertions, 20 deletions
diff --git a/scripts/backup b/scripts/backup
index de1ba98..e9b18e8 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,31 +1,22 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# DECLARE DATA AND CONF FILES TO BACKUP
-#=================================================
-ynh_print_info --message="Declaring files to be backed up..."
+ynh_print_info "Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
-ynh_backup --src_path="$install_dir"
+ynh_backup "$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
-ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
@@ -33,31 +24,31 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# BACKUP LOGROTATE
#=================================================
-ynh_backup --src_path="/etc/logrotate.d/$app"
+ynh_backup "/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
-ynh_backup --src_path="/etc/systemd/system/$app-web.service"
-ynh_backup --src_path="/etc/systemd/system/$app-sidekiq.service"
-ynh_backup --src_path="/etc/systemd/system/$app-streaming.service"
+ynh_backup "/etc/systemd/system/$app-web.service"
+ynh_backup "/etc/systemd/system/$app-sidekiq.service"
+ynh_backup "/etc/systemd/system/$app-streaming.service"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
-ynh_backup --src_path="/etc/cron.d/$app"
+ynh_backup "/etc/cron.d/$app"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================
-ynh_print_info --message="Backing up the PostgreSQL database..."
+ynh_print_info "Backing up the PostgreSQL database..."
-ynh_psql_dump_db --database="$db_name" > db.sql
+ynh_psql_dump_db > db.sql
#=================================================
# END OF SCRIPT
#=================================================
-ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
+ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."