test_apps/backup_recommended_app_ynh/scripts/backup
2021-01-04 00:58:31 +01:00

19 lines
388 B
Bash

#!/bin/bash
set -eu
source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
# Backup the app files
ynh_backup /var/www/$app
# Backup the conf files
ynh_backup /etc/nginx/conf.d/$domain.d/$app.conf
# Backup the custom file to a different location
ynh_backup /etc/importantfile /etc/yoloswag
# Backup db
ynh_mysql_dump_db $app > db.sql