Commit 11b369ad authored by Nicolas Steinmetz's avatar Nicolas Steinmetz

Add backup files

parent 09fc621b
Pipeline #845 failed with stage
in 51 seconds
......@@ -6,12 +6,13 @@ ENV NEXTCLOUD_DB_PASSWORD=nextcloud
ENV NEXTCLOUD_DB_HOST=db
COPY pg_dump.cron /etc/periodic/daily/pg_dump
COPY nextcloud_files.cron /etc/periodic/daily/nextcloud_files
RUN apk update --no-cache \
&& apk add --no-cache postgresql-client postgresql \
&& apk add --no-cache python3 py3-netifaces \
&& pip3 install --no-cache-dir python-swiftclient python-keystoneclient \
&& mkdir -p /srv/backup /srv/files \
&& chmod 755 /etc/periodic/daily/pg_dump
&& chmod 755 /etc/periodic/daily/pg_dump /etc/periodic/daily/nextcloud_files
CMD ["crond","-f"]
\ No newline at end of file
......@@ -5,7 +5,7 @@ BACKUP_DIR=/srv/backup
SRC_DIR=/srv/files
# Do backup
tar Pczf ${BACKUP_DIR}/${BACKUP_FILE} ${SRC_DIR}
tar czf ${BACKUP_DIR}/${BACKUP_FILE} ${SRC_DIR}
# Enable swift upload - assume environment variables are set
if [[ ${SWIFT_UPLOAD} ]]; then
......
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