[FIX]Odoobackup overlayFS problem with tail

This commit is contained in:
Fabien BOURGEOIS 2017-11-21 10:12:11 +01:00
parent c2b65a58b2
commit 146ac5967b
6 changed files with 7 additions and 11 deletions

View File

@ -9,7 +9,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
COPY crontab /etc/crontab
RUN chmod 644 /etc/crontab
RUN touch /var/log/cron.log
WORKDIR /opt/backup
COPY rsync.template .

View File

@ -1,6 +1,5 @@
# hourly backup
# m h dom mon dow user command
15 * * * * root /bin/bash /opt/backup/rsync.sh >> /var/log/cron.log 2>&1
0 3 * * * root /usr/bin/python /opt/backup/plan.py >> /var/log/cron.log 2>&1
15 * * * * root /bin/bash /opt/backup/rsync.sh > /proc/1/fd/1 2>/proc/1/fd/2
0 3 * * * root /usr/bin/python /opt/backup/plan.py > /proc/1/fd/1 2>/proc/1/fd/2
# empty line needed

View File

@ -2,4 +2,4 @@
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
cron && tail -f /var/log/cron.log
cron -f

View File

@ -12,13 +12,12 @@ RUN apt-get install -y --no-install-recommends cron gettext-base
COPY crontab /etc/crontab
RUN chmod 644 /etc/crontab
RUN touch /var/log/cron.log
COPY backup.template .
COPY plan.py .
COPY launch.sh .
RUN chown -R odoo:odoo . && chown odoo:odoo /var/log/cron.log
RUN chown -R odoo:odoo .
VOLUME /home/odoo/backups
CMD bash launch.sh

View File

@ -1,6 +1,5 @@
# daily odoo backup
# m h dom mon dow user command
0 2 * * * odoo /bin/bash /home/odoo/backup.sh >> /var/log/cron.log 2>&1
10 2 * * * odoo /usr/bin/python /home/odoo/plan.py >> /var/log/cron.log 2>&1
0 2 * * * odoo /bin/bash /home/odoo/backup.sh > /proc/1/fd/1 2>/proc/1/fd/2
10 2 * * * odoo /usr/bin/python /home/odoo/plan.py > /proc/1/fd/1 2>/proc/1/fd/2
# empty line required at the end of this file for a valid cron file.

View File

@ -2,4 +2,4 @@
envsubst < /home/odoo/backup.template > /home/odoo/backup.sh
chown odoo:odoo /home/odoo/backup.sh
cron && tail -f /var/log/cron.log
cron -f