mirror of
https://github.com/YunoHost/test_apps.git
synced 2024-09-03 20:06:29 +02:00
19 lines
388 B
Bash
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
|