<!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=ISO-8859-1"><title>Automated Backup</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><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"><link rel="stylesheet" href="openacs.css" type="text/css"></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" 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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="automated-backup"></a>Automated Backup</h2></div></div><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 <tt class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span>/database-backup</tt> and then backs up all of <tt class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span></tt> to a single zip file, and then copies that zip file to another computer.</p><div class="orderedlist"><ol type="1"><li><p>Make sure that the manual backup process described above works.</p></li><li><p>Customize the default backup script.  Edit <tt class="filename">/var/lib/aolserver/<span class="replaceable"><span class="replaceable">$OPENACS_SERVICE_NAME</span></span>/etc/backup.sh</tt> with your specific parameters.</p></li><li><p>
        Make sure the file is executable:</p><pre class="programlisting">chmod +x backup.sh</pre></li><li><p>
        Set this file to run automatically by adding a line to root's crontab. (Typically, with <tt class="computeroutput">export EDITOR=emacs; crontab -e</tt>.)  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>