1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coin_ynh.git synced 2024-09-03 18:16:26 +02:00
coin_ynh/scripts/backup

24 lines
566 B
Text
Raw Normal View History

2017-04-09 11:05:39 +02:00
#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
# See comments in install script
app=$YNH_APP_INSTANCE_NAME
# Source YunoHost helpers
. /usr/share/yunohost/helpers
# Backup sources & data
ynh_backup "/opt/$app" "sources"
# Copy NGINX configuration
domain=$(ynh_app_setting_get "$app" domain)
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
# Copy Gunicorn pool configuration
ynh_backup "/etc/systemd/system/$app.service" "gunicorn.service"
2018-12-20 23:05:20 +01:00
# Backup database
ynh_psql_dump_db "$app" > ${YNH_CWD}/dump.sql