diff --git a/manifest.toml b/manifest.toml index 3de3396..e9539b2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,6 +53,8 @@ ram.runtime = "50M" [resources.install_dir] + [resources.data_dir] + [resources.permissions] main.url = "/" main.additional_urls = ["/api/upload"] diff --git a/scripts/backup b/scripts/backup index 50e701d..19359f8 100644 --- a/scripts/backup +++ b/scripts/backup @@ -11,6 +11,12 @@ ynh_print_info "Declaring files to be backed up..." ynh_backup "$install_dir" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup "$data_dir" + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index a8a434e..6f1ed34 100644 --- a/scripts/restore +++ b/scripts/restore @@ -12,6 +12,13 @@ ynh_restore "$install_dir" chmod +x "$install_dir/server/bin/prod.js" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression "Restoring the data directory..." + +ynh_restore "$data_dir" + #================================================= # REINSTALL DEPENDENCIES #=================================================