1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jirafeau_ynh.git synced 2024-09-03 19:35:53 +02:00
jirafeau_ynh/scripts/backup
Éric Gaspar 05fed061bc
Testing (#104)
* 4.4.0 (#94)

* 4.4.0

* Auto-update README

* Apply example_ynh

* Auto-update README

* Update manifest.json

* [autopatch] Add Common Platform Enumeration id to `manifest.json` (#99)

* Upgrade  (#98)

* 4.4.0 (#94)

* 4.4.0

* Auto-update README

* Apply example_ynh

* Auto-update README

* Update manifest.json

Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* [autopatch] Add Common Platform Enumeration id to `manifest.json`

Co-authored-by: yalh76 <yalh@yahoo.com>
Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: Yunohost-Bot <>

* Auto-update README

* Bullseye (#100)

* Auto-update README

* PHP shouldn't allow `array(foobar)` to work if foobar is undefined...

* Upgrade to bullseye

* Auto-update README

* Auto-update README

* Fix

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>

* set relative path for --keep opt

* 4.5.0

* Auto-update README

* Auto-update README

* Fix PHP

* Version 2 (#105)

* v2

* Auto-update README

* v2

* Auto-update README

* Update upgrade

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

---------

Co-authored-by: yalh76 <yalh@yahoo.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-04-04 19:28:44 +02:00

52 lines
1.7 KiB
Bash

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."