1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gogs_ynh.git synced 2024-09-03 20:36:23 +02:00
gogs_ynh/scripts/backup

29 lines
616 B
Text
Raw Normal View History

2016-08-15 15:38:50 +02:00
#!/bin/bash
# IMPORT GENERIC HELPERS
source /usr/share/yunohost/helpers
2016-08-15 15:38:50 +02:00
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
2016-08-15 15:38:50 +02:00
# Load common variables and helpers
source ./experimental_helper.sh
source ./_common.sh
2016-08-15 15:38:50 +02:00
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
# Copy the app source files
ynh_backup "$DESTDIR"
2016-08-15 15:38:50 +02:00
# Copy the data files
DATADIR="/home/$app"
ynh_backup "$DATADIR"
2016-08-15 15:38:50 +02:00
# Copy the conf files
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf"
ynh_backup "/etc/systemd/system/${app}.service"
2016-08-15 15:38:50 +02:00
# Dump the database
ynh_mysql_dump_db "$dbname" > ./db.sql