1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00
rocketchat_ynh/scripts/backup
Selamanse 07f0c1b9c9
Make it work again (#71)
* Add doctl test files

* Fix nodejs installation

* Improve droplet create

* Improve droplet create

* Improve droplet create

* Modify pkgchk config

* Modify pkgchk config

* Add testconfig again

* Use new helpers and restrict arch

* Upgrade test setup

* Add selamanses key

* Add fingerprint as key id

* Use prebuilt image

* Remove variables in app.src

* Add cleanup cmds

* Fix upgrade

* Remove apt-key warning

* Revert travis

* Revert apt-key setting and restore modifications (#70)

* Fix linter issues

* Fix linter issues

* Fix ynh_replace_string arguments

* Update README.md
2019-05-13 15:41:47 +02:00

39 lines
1.1 KiB
Bash

#!/bin/bash
set -eu
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get $app final_path)
domain=$(ynh_app_setting_get $app domain)
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup "$final_path"
#=================================================
# BACKUP THE CONFIGURATION
#=================================================
ynh_backup "/etc/systemd/system/$app.service" "conf/service"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "conf/nginx"
#=================================================
# BACKUP THE MONGODB DATABASE
#=================================================
mongodump -o "./dump"