ol-www0: Add cron job pull-sitemaps-from-ol-home0 #7781
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #7580
Add a second cron job to the
openlibrary_web_nginx
Docker container which runs on the hostol-www0
. This job runs at 8 pm on the first day of every month and pulls the newly createdsitemaps
from the hostol-home0
.rsync
which must be added to theopenlibrary_web_nginx
Docker container.docker/ol-nginx-start.sh
concatenates multiple files into one before feeding them to crontab.Technical
Testing
On
ol-www0
...rsync --version
docker exec -it openlibrary_web_nginx_1 bash # --> docker container
rsync --version
cd /sitemaps
ls
rm -r previous_sitemaps
rm rsync.log
apt-get update && apt-get install rsync # https://internetarchive.slack.com/archives/GM13CHXBP/p1681428713708969
vi /olsystem/etc/cron.d/pull-sitemaps-from-ol-home0
CRONTAB_FILES="/etc/cron.d/archive-webserver-logs /etc/cron.d/pull-sitemaps-from-ol-home0"
cat $CRONTAB_FILES | crontab -
crontab -l
service cron start
ls
cat $CRONTAB_FILES | crontab -
crontab -l
service cron start
Screenshot
Stakeholders
olsystem cron jobs in /etc/cron.d
mrtgopenlibrary.allnodes