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