mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
* Update manifest.toml * Auto-update READMEs * add pre upgrade warning for NC 29 * update to PHP8.3 * Auto-update READMEs * Update manifest.toml * Auto-update READMEs * Fix space splitting in phpflags on install (#690) * Auto-update READMEs * Update upgrade * Update manifest.toml * Auto-update READMEs * Fix phpflags (#691) * Fix upgrade: php version is 8.3 starting from 29.x ? (#692) * Update manifest.toml * Auto-update READMEs * Update tests.toml * [autopatch] Do not delete logs on app removal (#697) * [autopatch] Do not delete logs on app removal (#698) Co-authored-by: Yunohost-Bot <> * 29.0.3 * Auto-update READMEs * Update remove * Indent * Fix again upgrade ending with Nextcloud being in PHP 8.2 ? * Auto-update READMEs * Update nginx.conf * Update manifest.toml * Auto-update READMEs * Rework DESCRIPTION.md (#707) * Update DESCRIPTION_fr.md * Auto-update READMEs * Update DESCRIPTION.md * Auto-update READMEs * Update DESCRIPTION_fr.md * Auto-update READMEs --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * bump all old versions * oupsie * Auto-update READMEs * system_addressbook_exposed is a boolean * Auto-update READMEs * migrate system_addressbook_exposed to boolean, fix upgrade test * another fix for system_addressbook_exposed, update the dav conf accordingly * zblerg, do not modify system_addressbook_exposed config value in the upgrade script * add redis-server as deps * find files before chown them * chown the root folder too * fix find condition * find ... chmod is not faster, at least avoid to chown -R the data_dir in the upgrade script * add a button in the config panel to run chown/chmod on data_dir * we can avoid this chmod too i guess? * only nextcloud is allowed to read the config file * zblerg, the config file doesn't exist before install * wait until nginx has actually remove the nextcloud conf during upgrade before checking the url_handled * create a function for that * fix change-url dav detection * only if domain has changed... * Update scripts/_common.sh * moar sleep * oups * minor typos * Update backup * minor typos --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: OniriCorpe <oniricorpe@disroot.org> Co-authored-by: lyyn <79758863+lyynd@users.noreply.github.com> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
66 lines
2.1 KiB
Bash
Executable file
66 lines
2.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source ../settings/scripts/_common.sh
|
|
source /usr/share/yunohost/helpers
|
|
source ../settings/scripts/_ynh_mysql_dump_db.sh
|
|
|
|
#=================================================
|
|
# 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 DIRECTORY
|
|
#=================================================
|
|
|
|
ynh_backup --src_path="$data_dir" --is_big
|
|
|
|
#=================================================
|
|
# SYSTEM CONFIGURATION
|
|
#=================================================
|
|
|
|
# Backup the PHP-FPM configuration
|
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
|
|
# Backup the nginx configuration
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
|
|
# Backup the logrotate configuration
|
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
|
|
|
# Backup the Fail2Ban config
|
|
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
|
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
|
|
|
#=================================================
|
|
# BACKUP VARIOUS FILES
|
|
#=================================================
|
|
|
|
ynh_backup --src_path="/etc/cron.d/$app"
|
|
|
|
ynh_backup --src_path="/var/log/$app"
|
|
|
|
#=================================================
|
|
# BACKUP THE MYSQL DATABASE
|
|
#=================================================
|
|
ynh_print_info --message="Backing up the MySQL database..."
|
|
|
|
ynh_mysql_dump_db --database="$db_name" --default_character_set="utf8mb4" > db.sql
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|