Revert "[FIX]Odoobackup overlayFS problem with tail"
This reverts commit 3bcfeb7add3111c2b6c5ebb56c038ca4a323a1ca.
This commit is contained in:
parent
146ac5967b
commit
9b3d10a27e
@ -9,6 +9,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||||||
|
|
||||||
COPY crontab /etc/crontab
|
COPY crontab /etc/crontab
|
||||||
RUN chmod 644 /etc/crontab
|
RUN chmod 644 /etc/crontab
|
||||||
|
RUN touch /var/log/cron.log
|
||||||
|
|
||||||
WORKDIR /opt/backup
|
WORKDIR /opt/backup
|
||||||
COPY rsync.template .
|
COPY rsync.template .
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# hourly backup
|
# hourly backup
|
||||||
# m h dom mon dow user command
|
# m h dom mon dow user command
|
||||||
15 * * * * root /bin/bash /opt/backup/rsync.sh > /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 > /proc/1/fd/1 2>/proc/1/fd/2
|
0 3 * * * root /usr/bin/python /opt/backup/plan.py >> /var/log/cron.log 2>&1
|
||||||
# empty line needed
|
# empty line needed
|
||||||
|
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
|
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
|
||||||
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
|
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
|
||||||
cron -f
|
cron && tail -f /var/log/cron.log
|
||||||
|
@ -12,12 +12,13 @@ RUN apt-get install -y --no-install-recommends cron gettext-base
|
|||||||
|
|
||||||
COPY crontab /etc/crontab
|
COPY crontab /etc/crontab
|
||||||
RUN chmod 644 /etc/crontab
|
RUN chmod 644 /etc/crontab
|
||||||
|
RUN touch /var/log/cron.log
|
||||||
|
|
||||||
COPY backup.template .
|
COPY backup.template .
|
||||||
COPY plan.py .
|
COPY plan.py .
|
||||||
COPY launch.sh .
|
COPY launch.sh .
|
||||||
|
|
||||||
RUN chown -R odoo:odoo .
|
RUN chown -R odoo:odoo . && chown odoo:odoo /var/log/cron.log
|
||||||
VOLUME /home/odoo/backups
|
VOLUME /home/odoo/backups
|
||||||
|
|
||||||
CMD bash launch.sh
|
CMD bash launch.sh
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# daily odoo backup
|
# daily odoo backup
|
||||||
# m h dom mon dow user command
|
# 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
|
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 > /proc/1/fd/1 2>/proc/1/fd/2
|
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.
|
# 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
|
envsubst < /home/odoo/backup.template > /home/odoo/backup.sh
|
||||||
chown odoo:odoo /home/odoo/backup.sh
|
chown odoo:odoo /home/odoo/backup.sh
|
||||||
cron -f
|
cron && tail -f /var/log/cron.log
|
||||||
|
Loading…
Reference in New Issue
Block a user