backup restoration 90% completed

This commit is contained in:
Serghey Rodin 2013-03-28 01:12:57 +02:00
commit 65db51189c
16 changed files with 330 additions and 99 deletions

47
bin/v-schedule-user-backup Executable file
View 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