1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
webtrees_ynh/scripts/backup
eric_G 75b9177560
Testing (#90)
* Update manifest.toml

* Auto-update README

* Upgrade Yunohost version (#84)

* Testing (#83)

* Update manifest.toml

* Auto-update README

---------

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

* update package version to coordinate with upstream

---------

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* Auto-update README

* fix

* fix

* Auto-update README

* cleaning

* Upgrade to v2.1.20 (#89)

* Upgrade to v2.1.20

* Auto-update READMEs

* fix

* Auto-update READMEs

---------

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

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
2024-06-17 22:22:44 +02:00

42 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
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"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info "Backing up the MySQL database..."
ynh_mysql_dump_db "$db_name" > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."