mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 04:50:47 -07:00
improvements on sftp backups
This commit is contained in:
parent
1bcdef615c
commit
cb99788a43
5 changed files with 134 additions and 145 deletions
|
@ -12,20 +12,23 @@
|
||||||
# Argument defenition
|
# Argument defenition
|
||||||
host=$1
|
host=$1
|
||||||
ftp_user=$2
|
ftp_user=$2
|
||||||
ftp_password=$3
|
password=$3
|
||||||
ftp_path=${4-/backup}
|
ftp_path=${4-/backup}
|
||||||
ftp_port=${5-21}
|
ftp_port=${5-21}
|
||||||
A3='******'
|
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/func/main.sh
|
source $VESTA/func/main.sh
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
|
||||||
|
# Hiding password
|
||||||
|
A3='******'
|
||||||
|
EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
|
||||||
|
|
||||||
# Defining ftp command function
|
# Defining ftp command function
|
||||||
ftpc() {
|
ftpc() {
|
||||||
ftp -p -n $host $ftp_port <<EOF
|
ftp -p -n $host $ftp_port <<EOF
|
||||||
quote USER $ftp_user
|
quote USER $ftp_user
|
||||||
quote PASS $ftp_password
|
quote PASS $password
|
||||||
binary
|
binary
|
||||||
$1
|
$1
|
||||||
$2
|
$2
|
||||||
|
@ -40,7 +43,8 @@ EOF
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
check_args '3' "$#" "HOST USERNAME PASSWORD [PATH] [PORT]"
|
check_args '3' "$#" "HOST USERNAME PASSWORD [PATH] [PORT]"
|
||||||
validate_format 'host' 'ftp_user' 'ftp_password'
|
validate_format 'host' 'ftp_user'
|
||||||
|
is_password_valid
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -48,10 +52,11 @@ validate_format 'host' 'ftp_user' 'ftp_password'
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Checking network connection
|
# Checking network connection
|
||||||
fconn=$(ftpc)
|
fconn=$(ftpc 2>&1)
|
||||||
ferror=$(echo $fconn |grep -i -e failed -e error -e "Can't" -e "not conn")
|
ferror=$(echo $fconn |\
|
||||||
|
grep -i -e failed -e error -e "can't" -e "not conn" -e "incorrect")
|
||||||
if [ ! -z "$ferror" ]; then
|
if [ ! -z "$ferror" ]; then
|
||||||
echo "Error: can't login to ftp"
|
echo "Error: can't login to ftp server"
|
||||||
log_event "$E_CONNECT" "$EVENT"
|
log_event "$E_CONNECT" "$EVENT"
|
||||||
exit $E_CONNECT
|
exit $E_CONNECT
|
||||||
fi
|
fi
|
||||||
|
@ -71,7 +76,7 @@ fi
|
||||||
# Adding backup host
|
# Adding backup host
|
||||||
echo "HOST='$host'
|
echo "HOST='$host'
|
||||||
USERNAME='$ftp_user'
|
USERNAME='$ftp_user'
|
||||||
PASSWORD='$ftp_password'
|
PASSWORD='$password'
|
||||||
BPATH='$ftp_path'
|
BPATH='$ftp_path'
|
||||||
PORT='$ftp_port'
|
PORT='$ftp_port'
|
||||||
TIME='$TIME'
|
TIME='$TIME'
|
||||||
|
@ -84,7 +89,7 @@ chmod 660 $VESTA/conf/ftp.backup.conf
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Update vesta.conf
|
# Update vesta.conf
|
||||||
if [ -z "$(grep LANGUAGE $VESTA/conf/vesta.conf)" ]; then
|
if [ -z "$(grep BACKUP_SYSTEM $VESTA/conf/vesta.conf)" ]; then
|
||||||
echo "BACKUP_SYSTEM='ftp'" >> $VESTA/conf/vesta.conf
|
echo "BACKUP_SYSTEM='ftp'" >> $VESTA/conf/vesta.conf
|
||||||
else
|
else
|
||||||
bckp=$(echo "$BACKUP_SYSTEM,ftp" |\
|
bckp=$(echo "$BACKUP_SYSTEM,ftp" |\
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: add backup sftp host
|
# info: add backup sftp host
|
||||||
# options: HOST USERNAME [PASSWORD] [PATH] [PORT]
|
# options: HOST USERNAME PASSWORD [PATH] [PORT]
|
||||||
#
|
#
|
||||||
# The function adds sftp host for system backups
|
# The function adds sftp host for system backups
|
||||||
|
|
||||||
|
@ -11,87 +11,84 @@
|
||||||
# Argument defenition
|
# Argument defenition
|
||||||
sftp_host=$1
|
sftp_host=$1
|
||||||
sftp_user=$2
|
sftp_user=$2
|
||||||
sftp_password=${3-******}
|
password=$3
|
||||||
sftp_path=${4-backup}
|
sftp_path=${4-backup}
|
||||||
sftp_port=${5-22}
|
sftp_port=${5-22}
|
||||||
|
|
||||||
A3='******'
|
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/func/main.sh
|
source $VESTA/func/main.sh
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
|
||||||
# Replace password with ******
|
# Hiding password
|
||||||
if [[ $A3 != '******' ]]
|
A3='******'
|
||||||
then
|
EVENT="$DATE $TIME $SCRIPT $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9"
|
||||||
EVENT="${EVENT/$sftp_password/******}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# sftp command function
|
# sftp command function
|
||||||
sftpc() {
|
sftpc() {
|
||||||
expect -f "-" <<EOF "$@"
|
expect -f "-" <<EOF "$@"
|
||||||
set count 0
|
set count 0
|
||||||
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$sftp_port $sftp_user@$sftp_host
|
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o \
|
||||||
expect {
|
Port=$sftp_port $sftp_user@$sftp_host
|
||||||
"password:" {
|
expect {
|
||||||
send "$sftp_password\r"
|
"password:" {
|
||||||
exp_continue
|
send "$password\r"
|
||||||
}
|
exp_continue
|
||||||
|
}
|
||||||
|
|
||||||
-re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
|
-re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
|
||||||
set count \$argc
|
set count \$argc
|
||||||
set output "Disconnected."
|
set output "Disconnected."
|
||||||
set rc $E_FTP
|
set rc $E_FTP
|
||||||
exp_continue
|
exp_continue
|
||||||
}
|
}
|
||||||
|
|
||||||
-re ".*denied.*(publickey|password)." {
|
-re ".*denied.*(publickey|password)." {
|
||||||
set output "Permission denied, wrong publickey or password."
|
set output "Permission denied, wrong publickey or password."
|
||||||
set rc $E_CONNECT
|
set rc $E_CONNECT
|
||||||
}
|
}
|
||||||
|
|
||||||
"sftp>" {
|
"sftp>" {
|
||||||
if {\$count < \$argc} {
|
if {\$count < \$argc} {
|
||||||
set arg [lindex \$argv \$count]
|
set arg [lindex \$argv \$count]
|
||||||
send "\$arg\r"
|
send "\$arg\r"
|
||||||
incr count
|
incr count
|
||||||
} else {
|
} else {
|
||||||
send "exit\r"
|
send "exit\r"
|
||||||
set output "Disconnected."
|
set output "Disconnected."
|
||||||
if {[info exists rc] != 1} {
|
if {[info exists rc] != 1} {
|
||||||
set rc $OK
|
set rc $OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exp_continue
|
exp_continue
|
||||||
}
|
}
|
||||||
|
|
||||||
timeout {
|
timeout {
|
||||||
set output "Connection timeout."
|
set output "Connection timeout."
|
||||||
set rc $E_CONNECT
|
set rc $E_CONNECT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[info exists output] == 1} {
|
if {[info exists output] == 1} {
|
||||||
puts "\$output"
|
puts "\$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
exit \$rc
|
exit \$rc
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Verifications #
|
# Verifications #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
check_expect=$(which expect)
|
check_args '3' "$#" "HOST USERNAME PASSWORD [PATH] [PORT]"
|
||||||
if [[ ! -n $check_expect ]]
|
which expect >/dev/null 2>&1
|
||||||
then
|
if [ $? -ne 0 ];then
|
||||||
echo "Error: \"expect\" utility not found"
|
echo "Error: expect utility not found"
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
exit $E_NOTEXIST
|
exit $E_NOTEXIST
|
||||||
fi
|
fi
|
||||||
|
is_password_valid
|
||||||
check_args '2' "$#" "HOST USERNAME [PASSWORD] [PATH] [PORT]"
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Action #
|
# Action #
|
||||||
|
@ -100,35 +97,35 @@ check_args '2' "$#" "HOST USERNAME [PASSWORD] [PATH] [PORT]"
|
||||||
# Checking network connection and write permissions
|
# Checking network connection and write permissions
|
||||||
sftmpdir="$sftp_path/vst.bK76A9SUkt"
|
sftmpdir="$sftp_path/vst.bK76A9SUkt"
|
||||||
sftpc "mkdir $sftp_path" > /dev/null 2>&1
|
sftpc "mkdir $sftp_path" > /dev/null 2>&1
|
||||||
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir"
|
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ "$rc" != 0 ]]
|
if [[ "$rc" != 0 ]]; then
|
||||||
then
|
case $rc in
|
||||||
case $rc in
|
|
||||||
$E_CONNECT) echo "Error: can't login to sftp host";;
|
$E_CONNECT) echo "Error: can't login to sftp host";;
|
||||||
$E_FTP) echo "Error: can't create temp folder on the sftp host";;
|
$E_FTP) echo "Error: can't create temp folder on the sftp host";;
|
||||||
esac
|
esac
|
||||||
log_event "$rc" "$EVENT"
|
log_event "$rc" "$EVENT"
|
||||||
exit "$rc"
|
exit "$rc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adding sftp backup config file
|
# Adding sftp backup config file
|
||||||
echo "HOST='$sftp_host'
|
echo "HOST='$sftp_host'
|
||||||
USERNAME='$sftp_user'
|
USERNAME='$sftp_user'
|
||||||
PASSWORD='$sftp_password'
|
PASSWORD='$password'
|
||||||
BPATH='$sftp_path'
|
BPATH='$sftp_path'
|
||||||
PORT='$sftp_port'
|
PORT='$sftp_port'
|
||||||
TIME='$TIME'
|
TIME='$TIME'
|
||||||
DATE='$DATE'" > $VESTA/conf/sftp.backup.conf
|
DATE='$DATE'" > $VESTA/conf/sftp.backup.conf
|
||||||
chmod 660 $VESTA/conf/sftp.backup.conf
|
chmod 660 $VESTA/conf/sftp.backup.conf
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Update vesta.conf
|
# Update vesta.conf
|
||||||
if [ -z "$(grep LANGUAGE $VESTA/conf/vesta.conf)" ]; then
|
if [ -z "$(grep BACKUP_SYSTEM $VESTA/conf/vesta.conf)" ]; then
|
||||||
echo "BACKUP_SYSTEM='ftp'" >> $VESTA/conf/vesta.conf
|
echo "BACKUP_SYSTEM='sftp'" >> $VESTA/conf/vesta.conf
|
||||||
else
|
else
|
||||||
bckp=$(echo "$BACKUP_SYSTEM,sftp" |\
|
bckp=$(echo "$BACKUP_SYSTEM,sftp" |\
|
||||||
sed "s/,/\n/g"|\
|
sed "s/,/\n/g"|\
|
||||||
|
@ -139,7 +136,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
echo "$sftp_host/$sftp_path successfully added as backup destination"
|
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -689,70 +689,63 @@ ftp_backup() {
|
||||||
|
|
||||||
# sftp command function
|
# sftp command function
|
||||||
sftpc() {
|
sftpc() {
|
||||||
expect -f "-" <<EOF "$@"
|
expect -f "-" <<EOF "$@"
|
||||||
set timeout 60
|
set timeout 60
|
||||||
set count 0
|
set count 0
|
||||||
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$PORT $USERNAME@$HOST
|
spawn /usr/bin/sftp -o StrictHostKeyChecking=no \
|
||||||
expect {
|
-o Port=$PORT $USERNAME@$HOST
|
||||||
"password:" {
|
expect {
|
||||||
send "$PASSWORD\r"
|
"password:" {
|
||||||
exp_continue
|
send "$PASSWORD\r"
|
||||||
}
|
exp_continue
|
||||||
|
}
|
||||||
-re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
|
|
||||||
set count \$argc
|
-re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
|
||||||
set output "Disconnected."
|
set count \$argc
|
||||||
set rc $E_FTP
|
set output "Disconnected."
|
||||||
exp_continue
|
set rc $E_FTP
|
||||||
}
|
exp_continue
|
||||||
|
}
|
||||||
-re ".*denied.*(publickey|password)." {
|
|
||||||
set output "Permission denied, wrong publickey or password."
|
-re ".*denied.*(publickey|password)." {
|
||||||
set rc $E_CONNECT
|
set output "Permission denied, wrong publickey or password."
|
||||||
}
|
set rc $E_CONNECT
|
||||||
|
}
|
||||||
-re "\[0-9]*%" {
|
|
||||||
exp_continue
|
-re "\[0-9]*%" {
|
||||||
}
|
exp_continue
|
||||||
|
}
|
||||||
"sftp>" {
|
|
||||||
if {\$count < \$argc} {
|
"sftp>" {
|
||||||
set arg [lindex \$argv \$count]
|
if {\$count < \$argc} {
|
||||||
send "\$arg\r"
|
set arg [lindex \$argv \$count]
|
||||||
incr count
|
send "\$arg\r"
|
||||||
} else {
|
incr count
|
||||||
send "exit\r"
|
} else {
|
||||||
set output "Disconnected."
|
send "exit\r"
|
||||||
if {[info exists rc] != 1} {
|
set output "Disconnected."
|
||||||
set rc $OK
|
if {[info exists rc] != 1} {
|
||||||
}
|
set rc $OK
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout {
|
||||||
|
set output "Connection timeout."
|
||||||
|
set rc $E_CONNECT
|
||||||
}
|
}
|
||||||
exp_continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
timeout {
|
if {[info exists output] == 1} {
|
||||||
set output "Connection timeout."
|
puts "\$output"
|
||||||
set rc $E_CONNECT
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if {[info exists output] == 1} {
|
|
||||||
puts "\$output"
|
|
||||||
}
|
|
||||||
|
|
||||||
exit \$rc
|
exit \$rc
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
sftp_backup() {
|
sftp_backup() {
|
||||||
#Checking expect installation
|
|
||||||
check_expect=$(which expect)
|
|
||||||
if [[ ! -n $check_expect ]]
|
|
||||||
then
|
|
||||||
echo "Error: \"expect\" utility not found"
|
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
|
||||||
exit $E_NOTEXIST
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Checking config
|
# Checking config
|
||||||
if [ ! -e "$VESTA/conf/sftp.backup.conf" ]; then
|
if [ ! -e "$VESTA/conf/sftp.backup.conf" ]; then
|
||||||
|
@ -788,36 +781,33 @@ sftp_backup() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Debug info
|
# Debug info
|
||||||
echo -e "$(date "+%F %T") Remote: $HOST/$BPATH/$user.$DATE.tar"
|
echo -e "$(date "+%F %T") Remote: sftp://$HOST/$BPATH/$user.$DATE.tar"
|
||||||
|
|
||||||
# Checking network connection and write permissions
|
# Checking network connection and write permissions
|
||||||
echo -e "$(date "+%F %T") Checking network connection and write permissions ..."
|
|
||||||
sftmpdir="$BPATH/vst.bK76A9SUkt"
|
sftmpdir="$BPATH/vst.bK76A9SUkt"
|
||||||
sftpc "mkdir $BPATH" > /dev/null 2>&1
|
sftpc "mkdir $BPATH" > /dev/null 2>&1
|
||||||
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
|
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ "$rc" != 0 ]]
|
if [[ "$rc" != 0 ]]; then
|
||||||
then
|
|
||||||
rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
case $rc in
|
case $rc in
|
||||||
$E_CONNECT) echo "Error: can't login to sftp host" | $send_mail -s "$subj" $email;;
|
$E_CONNECT) echo "Error: can't login to sftp host $HOST" |\
|
||||||
$E_FTP) echo "Error: can't create temp folder on the sftp host" | $send_mail -s "$subj" $email;;
|
$send_mail -s "$subj" $email;;
|
||||||
|
$E_FTP) echo "Error: can't create temp folder on sftp $HOST" |\
|
||||||
|
$send_mail -s "$subj" $email;;
|
||||||
esac
|
esac
|
||||||
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
||||||
log_event "$rc" "$EVENT"
|
log_event "$rc" "$EVENT"
|
||||||
exit "$rc"
|
exit "$rc"
|
||||||
fi
|
fi
|
||||||
echo -e "$(date "+%F %T") Connection established"
|
|
||||||
|
|
||||||
# Checking retention
|
# Checking retention
|
||||||
echo -e "$(date "+%F %T") Checking retention ..."
|
|
||||||
backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}' |grep "^$user\.")
|
backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}' |grep "^$user\.")
|
||||||
backups_count=$(echo "$backup_list" | wc -l)
|
backups_count=$(echo "$backup_list" | wc -l)
|
||||||
if [ "$backups_count" -ge "$BACKUPS" ]; then
|
if [ "$backups_count" -ge "$BACKUPS" ]; then
|
||||||
backups_rm_number=$((backups_count - BACKUPS + 1))
|
backups_rm_number=$((backups_count - BACKUPS + 1))
|
||||||
for backup in $(echo "$backup_list" | head -n $backups_rm_number); do
|
for backup in $(echo "$backup_list" | head -n $backups_rm_number); do
|
||||||
backup_date=$(echo $backup | sed -e "s/$user.//" -e "s/.tar.*$//")
|
backup_date=$(echo $backup | sed -e "s/$user.//" -e "s/.tar.*$//")
|
||||||
if [ -z $deprecated ]; then deprecated="$backup_date"; else deprecated="$deprecated $backup_date"; fi
|
|
||||||
echo -e "$(date "+%F %T") Roated sftp backup: $backup_date"
|
echo -e "$(date "+%F %T") Roated sftp backup: $backup_date"
|
||||||
msg="$msg\n$(date "+%F %T") Roated sftp backup: $backup_date"
|
msg="$msg\n$(date "+%F %T") Roated sftp backup: $backup_date"
|
||||||
sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1
|
sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1
|
||||||
|
@ -836,7 +826,6 @@ sftp_backup() {
|
||||||
sftpc "cd $BPATH" "put $user.$DATE.tar" > /dev/null 2>&1
|
sftpc "cd $BPATH" "put $user.$DATE.tar" > /dev/null 2>&1
|
||||||
rm -f $user.$DATE.tar
|
rm -f $user.$DATE.tar
|
||||||
fi
|
fi
|
||||||
echo -e "$(date "+%F %T") Upload complete"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "-- SUMMARY --"
|
echo "-- SUMMARY --"
|
||||||
|
|
|
@ -34,7 +34,7 @@ rm -f $VESTA/conf/ftp.backup.conf
|
||||||
# Update vesta.conf
|
# Update vesta.conf
|
||||||
bckp=$(echo "$BACKUP_SYSTEM" |\
|
bckp=$(echo "$BACKUP_SYSTEM" |\
|
||||||
sed "s/,/\n/g"|\
|
sed "s/,/\n/g"|\
|
||||||
sed "s/ftp//" |\
|
sed "s/^ftp$//" |\
|
||||||
sed "/^$/d"|\
|
sed "/^$/d"|\
|
||||||
sed ':a;N;$!ba;s/\n/,/g')
|
sed ':a;N;$!ba;s/\n/,/g')
|
||||||
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
|
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
|
||||||
|
|
1
bin/v-delete-backup-sftp-host
Normal file → Executable file
1
bin/v-delete-backup-sftp-host
Normal file → Executable file
|
@ -40,7 +40,6 @@ bckp=$(echo "$BACKUP_SYSTEM" |\
|
||||||
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
|
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
echo "sftp host successfulle removed from configuration"
|
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue