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
(Created page with "placeholder * ~~~~")
 
m (updated backup schedule)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
placeholder
== The crontab ==
The script is called from the root user's crontab, configured to run at 05:40 UTC.


* ''Comrade [[Comrade:KakumeiAshley|KakumeiAshley]]'' <sup>([[Comradeship:KakumeiAshley|talk]])</sup> 02:09, 9 August 2022 (UTC)
<pre>root@prolewiki:~# crontab -l
40 05 * * * /root/bin/backup.sh | tee -a /var/log/backup.sh.log
35 */1 * * * /root/bin/dfmon.sh | tee /var/log/dfmon.sh.log
root@prolewiki:~# date
Tue 09 Aug 2022 04:32:14 PM UTC</pre>
== The log ==
* 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 ==
 
See <code>/root/bin/backup.sh</code>

Latest revision as of 16:40, 9 August 2022

The crontab

The script is called from the root user's crontab, configured to run at 05:40 UTC.

root@prolewiki:~# crontab -l
40 05 * * * /root/bin/backup.sh | tee -a /var/log/backup.sh.log
35 */1 * * * /root/bin/dfmon.sh | tee /var/log/dfmon.sh.log
root@prolewiki:~# date
Tue 09 Aug 2022 04:32:14 PM UTC

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