mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
backup restoration 90% completed
This commit is contained in:
parent
1155e9065e
commit
65db51189c
16 changed files with 330 additions and 99 deletions
47
bin/v-schedule-user-backup
Executable file
47
bin/v-schedule-user-backup
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
# info: schedule user backup creation
|
||||
# options: USER
|
||||
#
|
||||
# The function for scheduling user backup creation.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'USER'
|
||||
validate_format 'user'
|
||||
is_system_enabled "$BACKUP_SYSTEM"
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
is_backup_enabled
|
||||
is_backup_scheduled 'backup'
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Adding backup task to the queue
|
||||
echo "$BIN/v-backup-user $user yes" >> $VESTA/data/queue/backup.pipe
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Logging
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue