Revert "[FIX]Overlayfs problem with cron (again)"
This reverts commit ae67c3adb638729b0597cc68c5efac323eb513e4.
This commit is contained in:
parent
2226da480d
commit
9064486491
@ -7,6 +7,9 @@ ENV DEST /var/backups/
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
cron gettext-base rsync python-minimal libpython-stdlib
|
||||
|
||||
# Avoid overlayfs bug with tail
|
||||
VOLUME /var/log
|
||||
|
||||
COPY crontab /etc/crontab
|
||||
RUN chmod 644 /etc/crontab
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# hourly backup
|
||||
# m h dom mon dow user command
|
||||
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
|
||||
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
|
||||
# empty line needed
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
|
||||
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
|
||||
cron -f
|
||||
touch /var/log/cron.log && cron && tail -f /var/log/cron.log
|
||||
|
@ -10,6 +10,9 @@ USER root
|
||||
RUN mkdir backups
|
||||
RUN apt-get install -y --no-install-recommends cron gettext-base
|
||||
|
||||
# Avoid overlayfs bug with tail
|
||||
VOLUME /var/log
|
||||
|
||||
COPY crontab /etc/crontab
|
||||
RUN chmod 644 /etc/crontab
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# daily odoo backup
|
||||
# m h dom mon dow user command
|
||||
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
|
||||
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
|
||||
# empty line required at the end of this file for a valid cron file.
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
envsubst < /home/odoo/backup.template > /home/odoo/backup.sh
|
||||
chown odoo:odoo /home/odoo/backup.sh
|
||||
cron -f
|
||||
touch /var/log/cron.log && cron && tail -f /var/log/cron.log
|
||||
|
Loading…
Reference in New Issue
Block a user