mirror of
https://github.com/YunoHost-Apps/libreerp_ynh.git
synced 2024-09-03 19:36:13 +02:00
26 lines
633 B
Bash
26 lines
633 B
Bash
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
source /usr/share/yunohost/helpers
|
|
#source _future.sh
|
|
source ../settings/scripts/_common.sh
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
final_path=$(ynh_app_setting_get "$app" final_path)
|
|
|
|
# Backup sources & data
|
|
ynh_backup "${final_path}/$APPNAME"
|
|
ynh_backup "${final_path}/custom-addons"
|
|
ynh_backup "${final_path}/.local"
|
|
|
|
# Backup configuration
|
|
ynh_backup "$conf_file"
|
|
|
|
# Copy NGINX configuration
|
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
|
|
|
# Copy database
|
|
sudo su -c "pg_dump $app" postgres > ./dump.sql
|