Skip to content

Commit b28aac5

Browse files
committed
minor fixes in backup script
1 parent ed11141 commit b28aac5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/v-backup-user

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ if [ "$USER" != '*' ]; then
487487
msg="$msg\n$(date "+%F %T") excluding directory $xpath"
488488
done
489489

490+
IFS=$'\n'
490491
set -f
491492
i=0
492493
for udir in $(ls |egrep -v "conf|web|dns|mail"); do
@@ -656,9 +657,9 @@ ftp_backup() {
656657
ftp_result=$(ftpc "mkdir $ftmpdir" "rm $ftmpdir" |grep -v Trying)
657658
if [ ! -z "$ftp_result" ] ; then
658659
rm -rf $tmpdir
659-
echo "Can't create ftp backup folder" |\
660+
echo "Can't create ftp backup folder ftp://$HOST$BPATH" |\
660661
$send_mail -s "$subj" $email
661-
echo "Error: cant's create ftp folder"
662+
echo "Error: cant's create ftp folder ftp://$HOST$BPATH"
662663
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
663664
log_event "$E_FTP" "$EVENT"
664665
exit $E_FTP
@@ -695,7 +696,7 @@ echo "-- SUMMARY --"
695696
msg="$msg\n-- SUMMARY --"
696697

697698
# Switching on backup system types
698-
for backup_type in $(echo -e "${BACKUP_SYSTEM//,/\n}"); do
699+
for backup_type in $(echo -e "${BACKUP_SYSTEM//,/\\n}"); do
699700
case $backup_type in
700701
local) local_backup ;;
701702
ftp) ftp_backup ;;

0 commit comments

Comments
 (0)