Backup filename changed (#1289)

* Backup filename changed

Changed the backup filename for running more backup each day - for example every 4 hours

* Restore user fix with new backup date

* Check if the backup name has an old notation

* Fix backup permission check

* fixed regex

* fix
This commit is contained in:
Robin Dirksen 2017-11-13 15:22:44 +01:00 committed by Anton Reutov
commit f8368220ff
2 changed files with 39 additions and 31 deletions

View file

@ -38,8 +38,15 @@ source $VESTA/conf/vesta.conf
# Check backup ownership function
is_backup_available() {
if ! [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
check_result $E_FORBIDEN "permission denied"
passed=false
if [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
passed=true
elif [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
passed=true
fi
if [ $passed = false ]; then
check_result $E_FORBIDEN "permission denied"
fi
}