Moved ftp backup to external script file
parent
ef841499f7
commit
033202a6a4
|
@ -9,8 +9,8 @@ RUN TF=`mktemp` &&\
|
|||
|
||||
EXPOSE 35621/TCP 35622/UDP 35623/TCP
|
||||
|
||||
COPY prefilebackup /usr/local/etc/urbackup/
|
||||
RUN chmod 0700 /usr/local/etc/urbackup/prefilebackup
|
||||
COPY scripts/* /usr/local/etc/urbackup/
|
||||
RUN chmod 0700 /usr/local/etc/urbackup/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY run.sh /app/
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "$DO_FTP_BACKUP" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# DISTANT DIRECTORY
|
||||
REMOTE_DIR="/"
|
||||
LOCAL_DIR="/backup/ftp"
|
||||
|
||||
#LOCAL DIRECTORY
|
||||
LOCAL_DIR="/backup"
|
||||
|
||||
# RUNTIME!
|
||||
echo
|
||||
echo "Starting download $REMOTE_DIR from $FTP_HOST to $LOCAL_DIR"
|
||||
date
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "$DO_FTP_BACKUP" ]]; then
|
||||
sh ftp_backup.sh
|
||||
fi
|
||||
|
Loading…
Reference in New Issue