backup 855 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
  3. source ../settings/scripts/_common.sh
  4. source /usr/share/yunohost/helpers
  5. ynh_print_info "Declaring files to be backed up..."
  6. #=================================================
  7. # BACKUP THE APP MAIN DIR
  8. #=================================================
  9. ynh_backup "$install_dir"
  10. #=================================================
  11. # SYSTEM CONFIGURATION
  12. #=================================================
  13. ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
  14. ynh_backup "/etc/systemd/system/$app.service"
  15. #=================================================
  16. # END OF SCRIPT
  17. #=================================================
  18. ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."