mirror of
https://github.com/YunoHost-Apps/osada_ynh.git
synced 2024-09-03 19:46:30 +02:00
Fix backup
This commit is contained in:
parent
4a5ab0db7b
commit
0681361e15
1 changed files with 1 additions and 29 deletions
|
@ -10,26 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
#REMOVEME? database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
|
@ -78,15 +58,7 @@ ynh_backup --src_path="/etc/cron.d/$app"
|
|||
# BACKUP THE DATABASE
|
||||
#=================================================
|
||||
|
||||
if [ $database = "mysql" ]; then
|
||||
# Backup MySQL database
|
||||
ynh_print_info --message="Backup of the MySQL database..."
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
elif [ $database = "postgresql" ]; then
|
||||
# Backup PostgreSQL database
|
||||
ynh_print_info --message="Backup of the PostgreSQL database..."
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
fi
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue