<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 'http://www.w3.org/TR/html4/loose.dtd"'> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Automated Backup</title><link rel="stylesheet" href="openacs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.0"><link rel="home" href="index.html" title="OpenACS Core Documentation"><link rel="up" href="backup-recovery.html" title="Chapter 8. Backup and Recovery"><link rel="previous" href="snapshot-backup.html" title="Manual backup and recovery"><link rel="next" href="backups-with-cvs.html" title="Using CVS for backup-recovery"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" style="border:0" alt="Alex logo"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="snapshot-backup.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Backup and Recovery</th><td width="20%" align="right"> <a accesskey="n" href="backups-with-cvs.html">Next</a></td></tr></table><hr></div><div class="sect1" title="Automated Backup"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="automated-backup"></a>Automated Backup</h2></div></div></div><p>The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in <code class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span>/database-backup</code> and then backs up all of <code class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span></code> to a single zip file, and then copies that zip file to another computer.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Make sure that the manual backup process described above works.</p></li><li class="listitem"><p>Customize the default backup script. Edit <code class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span>/etc/backup.sh</code> with your specific parameters.</p></li><li class="listitem"><p> Make sure the file is executable:</p><pre class="programlisting">chmod +x backup.sh</pre></li><li class="listitem"><p> Set this file to run automatically by adding a line to root's crontab. (Typically, with <code class="computeroutput">export EDITOR=emacs; crontab -e</code>.) This example runs the backup script at 1:30 am every day.</p><pre class="programlisting">30 1 * * * sh /var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span>/etc/backup.sh</pre></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="snapshot-backup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="backups-with-cvs.html">Next</a></td></tr><tr><td width="40%" align="left">Manual backup and recovery </td><td width="20%" align="center"><a accesskey="u" href="backup-recovery.html">Up</a></td><td width="40%" align="right"> Using CVS for backup-recovery</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/current/automated-backup.html#comments">View comments on this page at openacs.org</a></center></body></html>