1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00
This commit is contained in:
Limezy 2021-11-12 23:44:18 +07:00
parent b433cbf199
commit 7bf24b6e60
2 changed files with 18 additions and 6 deletions

View file

@ -55,18 +55,20 @@ ynh_print_info --message="Declaring files to be backed up..."
### creates and fill the archive with the files happens in the core after this
### script is called. Hence ynh_backups calls takes basically 0 seconds to run.
#=================================================
# BACKUP MINIO
#=================================================
pushd "$mc_path"
ynh_exec_warn_less sudo -u minio ./mc mirror --remove --a minio/outlinestorage "$final_path/outlinestorage"
popd
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP MINIO
#=================================================
yunohost backup create --apps minio
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================

View file

@ -81,6 +81,16 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE MINIO
#=================================================
pushd "$mc_path"
ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1"
ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage
ynh_exec_warn_less sudo -u minio ./mc cp --recursive "$final_path/outlinestorage" minio/outlinestorage
popd
#=================================================
# SPECIFIC RESTORATION
#=================================================