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

17 lines
409 B
Bash
Executable file

#!/bin/bash
# The parameter $1 is the backup directory location dedicated to the app
backup_dir=$1
# The parameter $2 is theid of the app instance
app=$2
domain=$(sudo yunohost app setting $app domain)
path=$(sudo yunohost app setting $app path)
# Backup sources & data
sudo cp -a /var/www/$app/. $backup_dir/sources
# Copy Nginx
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf $backup_dir/nginx.conf