Update backup.sh
This commit is contained in:
parent
b0d00934e5
commit
8b57aa2a04
10
backup.sh
10
backup.sh
|
@ -106,13 +106,15 @@ rm -f $prefix/$stamp/*
|
||||||
rmdir $prefix/$stamp
|
rmdir $prefix/$stamp
|
||||||
|
|
||||||
# Sending data
|
# Sending data
|
||||||
|
if [ -n "${sshhost}" ]
|
||||||
for xfile_item in `ls ${prefix}/compressed`
|
then
|
||||||
do
|
for xfile_item in `ls ${prefix}/compressed`
|
||||||
|
do
|
||||||
scp -B -i ${sshkey} ${prefix}/compressed/${xfile_item} ${sshuser}@${sshhost}:${sshpath} > /dev/null
|
scp -B -i ${sshkey} ${prefix}/compressed/${xfile_item} ${sshuser}@${sshhost}:${sshpath} > /dev/null
|
||||||
if [ "$?" == 0 ]
|
if [ "$?" == 0 ]
|
||||||
then
|
then
|
||||||
rm -f ${prefix}/compressed/${xfile_item}
|
rm -f ${prefix}/compressed/${xfile_item}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue