trabajo-afectivo/contrib/backup/zammad_backup.sh

39 lines
484 B
Bash
Raw Permalink Normal View History

2018-02-01 06:09:32 +00:00
#!/usr/bin/env bash
2016-12-10 13:48:33 +00:00
#
# zammad backup script
#
# shellcheck disable=SC2046
2017-05-07 10:20:59 +00:00
BACKUP_SCRIPT_PATH="$(dirname $(realpath $0))"
2016-12-10 13:48:33 +00:00
# import functions
2017-05-07 10:20:59 +00:00
. ${BACKUP_SCRIPT_PATH}/functions
2016-12-10 13:48:33 +00:00
# ensure we have all options
demand_backup_conf
# exec backup
2017-05-07 10:20:59 +00:00
start_backup_message
get_zammad_dir
check_database_config_exists
2016-12-10 13:48:33 +00:00
check_empty_password
2016-12-10 13:48:33 +00:00
get_backup_date
backup_dir_create
backup_file_write_test
delete_old_backups
2016-12-10 13:48:33 +00:00
backup_files
backup_db
2017-05-07 10:20:59 +00:00
backup_chmod_dump_data
2017-05-07 10:20:59 +00:00
finished_backup_message