Commit dacd5a2d authored by Eric's avatar Eric

script de backup vers FTP

parent 95a76e90
#!/bin/bash
#push backup to FTP (OVH)
. /etc/soo2/config
EXCLUDE=""
cd ${LOGDIR}
for filename in `find . ! -name *.gpg`
do
name=`echo ${filename} | sed s%"^./"%""%`
if [ -f "${filename}" ]; then
EXCLUDE+="--exclude ${name} "
fi
done
lftp -c "set ftp:list-options -a;
set ssl:check-hostname no;
open ftp://${ID}:${MDP}@${SRV};
lcd ${LOGDIR};
mkdir -f -p ${MYNAME}${LOGDIR};
cd ${MYNAME}${LOGDIR};
mirror --reverse --delete --use-cache --verbose --allow-chown --allow-suid --no-umask --parallel=2 ${EXCLUDE} --include-glob *.gpg"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment