1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00

Add apt lists to backup

This commit is contained in:
nemsia 2017-05-07 00:29:36 +02:00 committed by GitHub
parent 941ed7b71c
commit b72fba54be

View file

@ -29,10 +29,12 @@ ynh_backup "/etc/cron.d/${app}" "cron.conf"
ynh_backup "/etc/systemd/system/mastodon-web.service" "systemd_web.service"
ynh_backup "/etc/systemd/system/mastodon-sidekiq.service" "systemd_sidekiq.service"
ynh_backup "/etc/systemd/system/mastodon-streaming.service" "systemd_streaming.service"
ynh_backup "/etc/apt/sources.list.d/backports.list" "backports.list"
ynh_backup "/etc/apt/sources.list.d/yarn.list" "yarn.list"
# Backup db
sudo su - postgres <<COMMANDS
pg_dump --role=mastodon -U postgres --no-password mastodon_production > mastodon_db.sql
COMMANDS
ynh_backup "/var/lib/postgresql/${app}_db.sql" "${app}_db.sql"
ynh_secure_remove /var/lib/postgresql/mastodon_db.sql
ynh_secure_remove /var/lib/postgresql/mastodon_db.sql