Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ProleWiki:Maintenance/Backups: Difference between revisions

From ProleWiki, the proletarian encyclopedia
More languages
No edit summary
No edit summary
Line 1: Line 1:
placeholder / work in progress
== The crontab ==
The script is called from the root user's crontab, configured to run at 40 minutes past the hour every 10 hours.


* ''Comrade [[Comrade:KakumeiAshley|KakumeiAshley]]'' <sup>([[Comradeship:KakumeiAshley|talk]])</sup> 02:09, 9 August 2022 (UTC)
== The crontab ==
<pre>root@prolewiki:/etc/cron.daily# crontab -l
<pre>root@prolewiki:/etc/cron.daily# crontab -l
  40 */10 * * * /root/bin/backup.sh | tee -a /var/log/backup.sh.log</pre>
  40 */10 * * * /root/bin/backup.sh | tee -a /var/log/backup.sh.log</pre>
== The log ==
== The log ==
<code>/var/log/backup.sh.log</code>
* Cron redirects the output of the script to <code>/var/log/backup.sh.log</code>
* Zip logs output to <code>/var/log/backup.sh.zip.log</code>
 
There is currently no log rotation/truncation set up!!
== The code ==
== The code ==
<pre>
 
# placeholder
See <code>/root/bin/backup.sh</code>
</pre>

Revision as of 03:34, 9 August 2022

The crontab

The script is called from the root user's crontab, configured to run at 40 minutes past the hour every 10 hours.

root@prolewiki:/etc/cron.daily# crontab -l
 40 */10 * * * /root/bin/backup.sh | tee -a /var/log/backup.sh.log

The log

  • Cron redirects the output of the script to /var/log/backup.sh.log
  • Zip logs output to /var/log/backup.sh.zip.log

There is currently no log rotation/truncation set up!!

The code

See /root/bin/backup.sh