1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00
jupyterlab_ynh/scripts/backup

65 lines
1.7 KiB
Text
Raw Normal View History

2019-01-26 16:40:36 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Load common variables and helpers
source ../settings/scripts/_common.sh
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup() {
true
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
# Copy NGINX configuration
domain=$(ynh_app_setting_get "$app" domain)
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP JUPYTERLAB
#=================================================
ynh_print_info "Backuping of JupyterLab..."
ynh_backup "$final_path/jupyterhub.sqlite"
#=================================================
# BACKUP CONF FILES
#=================================================
ynh_print_info "Backuping configuration files of JupyterLab..."
ynh_backup "$config_path/jupyterhub_config.py"
ynh_backup "$final_path/etc/jupyter/jupyter_notebook_config.py"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup "/etc/systemd/system/$app.service"