https://faq.tuxfamily.org/index.php?title=Backups/En&feed=atom&action=historyBackups/En - Revision history2024-03-28T12:43:52ZRevision history for this page on the wikiMediaWiki 1.33.0https://faq.tuxfamily.org/index.php?title=Backups/En&diff=3566&oldid=prevXavier: +link to SMBC2014-11-24T22:34:01Z<p>+link to SMBC</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:34, 24 November 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l2" >Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has minimal backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has minimal backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc<ins class="diffchange diffchange-inline">. Basically, consider our backups are [http://www.smbc-comics.com/?id=3520 like this]</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>However, TuxFamily still provides everything you need to setup your own regular backups using your own computer(s).</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>However, TuxFamily still provides everything you need to setup your own regular backups using your own computer(s).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Xavierhttps://faq.tuxfamily.org/index.php?title=Backups/En&diff=3194&oldid=prevXavier: Fixed crontab comment2012-06-01T06:14:24Z<p>Fixed crontab comment</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 06:14, 1 June 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l89" >Line 89:</td>
<td colspan="2" class="diff-lineno">Line 89:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> crontab -e</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> crontab -e</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> # <del class="diffchange diffchange-inline">Recuperation du depot Subversion de QET </del>(<del class="diffchange diffchange-inline">en </del>incremental)</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> # <ins class="diffchange diffchange-inline">Retrieval of your project SVN repository </ins>(incremental <ins class="diffchange diffchange-inline">update</ins>)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 30 08 * * * /usr/bin/svnsync --non-interactive synchronize file:///data/backups/svnsync/your_project/your_svn.synced</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 30 08 * * * /usr/bin/svnsync --non-interactive synchronize file:///data/backups/svnsync/your_project/your_svn.synced</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This mirror will enable you to dump (and optionally filter) your SVN repository. In case you need to restore such a dump to TuxFamily, please contact the TuxFamily staff.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This mirror will enable you to dump (and optionally filter) your SVN repository. In case you need to restore such a dump to TuxFamily, please contact the TuxFamily staff.</div></td></tr>
</table>Xavierhttps://faq.tuxfamily.org/index.php?title=Backups/En&diff=3189&oldid=prevGradator: {{Template:Languages}} added2012-05-31T21:56:52Z<p>{{Template:Languages}} added</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 21:56, 31 May 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Template:Languages}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has minimal backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has minimal backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.</div></td></tr>
<!-- diff cache key tfcontrib_newfaq-mw_:diff::1.12:old-3186:rev-3189 -->
</table>Gradatorhttps://faq.tuxfamily.org/index.php?title=Backups/En&diff=3186&oldid=prevGradator: /* Principles */ s/mimimal/minimal/2012-05-31T21:38:38Z<p><span dir="auto"><span class="autocomment">Principles: </span> s/mimimal/minimal/</span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 21:38, 31 May 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Principles ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has <del class="diffchange diffchange-inline">mimimal </del>backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has <ins class="diffchange diffchange-inline">minimal </ins>backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>However, TuxFamily still provides everything you need to setup your own regular backups using your own computer(s).</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>However, TuxFamily still provides everything you need to setup your own regular backups using your own computer(s).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<!-- diff cache key tfcontrib_newfaq-mw_:diff::1.12:old-3185:rev-3186 -->
</table>Gradatorhttps://faq.tuxfamily.org/index.php?title=Backups/En&diff=3185&oldid=prevXavier: /* SVN repositories */ absolute path for svnsync2012-05-30T17:29:44Z<p><span dir="auto"><span class="autocomment">SVN repositories: </span> absolute path for svnsync</span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 17:29, 30 May 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l88" >Line 88:</td>
<td colspan="2" class="diff-lineno">Line 88:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> # Recuperation du depot Subversion de QET (en incremental)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> # Recuperation du depot Subversion de QET (en incremental)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 30 08 * * * svnsync --non-interactive synchronize file:///data/backups/svnsync/your_project/your_svn.synced</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 30 08 * * * <ins class="diffchange diffchange-inline">/usr/bin/</ins>svnsync --non-interactive synchronize file:///data/backups/svnsync/your_project/your_svn.synced</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This mirror will enable you to dump (and optionally filter) your SVN repository. In case you need to restore such a dump to TuxFamily, please contact the TuxFamily staff.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This mirror will enable you to dump (and optionally filter) your SVN repository. In case you need to restore such a dump to TuxFamily, please contact the TuxFamily staff.</div></td></tr>
</table>Xavierhttps://faq.tuxfamily.org/index.php?title=Backups/En&diff=3184&oldid=prevXavier: Creation2012-05-30T17:27:22Z<p>Creation</p>
<p><b>New page</b></p><div>=== Principles ===<br />
Due to financial reasons, TuxFamily does not provide any backup service. While the technical team sure has mimimal backups that may be used to repair the whole platform in case of a huge technical problem, this is far from the usual expectations for a backup service: decent retention, ability to cherry-pick data to be restored without contacting an admin, etc.<br />
However, TuxFamily still provides everything you need to setup your own regular backups using your own computer(s).<br />
<br />
=== Why should I backup my data? ===<br />
<br />
Three main reasons:<br />
* Avoid losing your work, or the work of your users/contributors, in case of a technical issue on TuxFamily's side -- while our infrastructure is pretty reliable, this has always been reason #1 to backup data.<br />
* Offer yourself the ability to retrieve your web site as it was...<br />
** '''before''' you made that huge misconfiguration in your CMS or whatever<br />
** or before it got hacked by some script kiddie because you did not respect [[Security/En|our Security recommendations]].<br />
* The more data you can retrieve by yourself, the more you are independent from your hoster.<br />
<br />
=== What can I backup and how? ===<br />
* Each night, we generate one .sql dump for each of your MySQL/PgSQL database; you can retrieve them using scp/rsync.<br />
* Webareas and download repositories can be fetched using rsync.<br />
* SVN repositories can be mirrored using svnsync.<br />
* Git and Mercurial repositories can be easily cloned.<br />
<br />
=== What can't I backup and why? ===<br />
There is currently no way for you to backup what you configure in the TuxFamily panel (group description/members, mailing lists, mail domains, domain names and cron jobs parameters) -- however, the underlying database is regularly backed up on our side with good retention, so you should not worry about it. Note you will have to contact the TuxFamily staff to retrieve this kind of data.<br />
Also, scripts provided here focus on web areas, download repositories, databases, Subversion repositories and do not treat:<br />
* CVS, because TuxFamily does not provide any way to backup them completely; you may want to try cvssuck.<br />
* Git/Mercurial repositories, mailing lists, mailboxes.<br />
<br />
=== Prerequisites ===<br />
The scripts and techniques detailed below expect your SSH account to be enabled. If you want to schedule them instead of executing them manually, you will also need to set up a SSH key, as described on [[User/En]]. Notes:<br />
* this SSH key must be available to the user account that will run your backups<br />
* ensure your backups are stored in a secured place (e.g. not world-readable): do not let your backups become another attack vector...<br />
<br />
Also, they are Unix techniques, tested under Linux. This implies you need a Linux, Unix or Unix-like operating system, which is expected to be rather common in the Free Software world. Do not try to use your TuxFamily SSH account for this purpose: beyond quota-induced problems, it does not make sense to backup data from the hosting platform to the hosting platform itself.<br />
<br />
=== Web areas, download repositories and databases ===<br />
<br />
When it comes to fetching and archiving data regularly, many possibilities exist, ranging from a custom scp-based script to expensive proprietary solutions. You are of course free to choose the solution that fits your needs, depending on your skills and constraints. What follows is an abbreviated procedure to schedule TuxFamily backups for your_project using your_user account and the '''rsnapshot''' tool. You can of course change paths to whatever fits your needs (well, avoid /tmp and other tmpfs though):<br />
<br />
Create the root directory for your backup<br />
mkdir -p /data/backups/{rsnapshot,run}<br />
chmod 700 /data/backups<br />
<br />
Adapt this configuration to create /data/backups/rsnapshot.conf<br />
# This configuration file comes from a simple:<br />
# zegrep '^[^#]' /usr/share/doc/rsnapshot/examples/rsnapshot.conf.default.gz<br />
# ... on my debian workstation. See man 1 rsnapshot for details.<br />
config_version 1.2<br />
snapshot_root /data/backups/rsnapshot/<br />
cmd_cp /bin/cp<br />
cmd_rm /bin/rm<br />
cmd_rsync /usr/bin/rsync<br />
cmd_ssh /usr/bin/ssh<br />
cmd_logger /usr/bin/logger<br />
retain daily 60<br />
retain weekly 8<br />
verbose 2<br />
loglevel 3<br />
lockfile /data/backups/run/rsnapshot.pid<br />
backup your_user@ssh.tuxfamily.org:/home/your_project/ tuxfamily/<br />
<br />
Take care: the configuration lines above contain tabs characters that must be preserved.<br />
<br />
Schedule backups:<br />
crontab -e<br />
<br />
# m h dom mon dow command<br />
0 8 * * * /usr/bin/rsnapshot -c /data/backups/rsnapshot.conf daily<br />
0 20 * * 1 /usr/bin/rsnapshot -c /data/backups/rsnapshot.conf weekly<br />
<br />
See "man 5 crontab" for more information about the syntax above.<br />
<br />
=== SVN repositories ===<br />
The SVNSync tool enables you to create and update a copy of an existing repository. You may find many tutorials on the Internet about how it works and how to use it, so this FAQ will just briefly repeat the procedure for TuxFamily, considering you want to backup your_svn repository from your_project:<br />
<br />
Prepare the synced repository:<br />
mkdir -p /data/backups/svnsync/your_project<br />
cd /data/backups/svnsync/your_project<br />
<br />
# create a new SVN repository<br />
svnadmin create your_svn.synced<br />
<br />
# Make this repository allow revision property changes<br />
echo '#!/bin/sh' > your_svn.synced/hooks/pre-revprop-change<br />
chmod ug+x your_svn.synced/hooks/pre-revprop-change<br />
<br />
# prepare the new repository to be a read-only mirror of your SVN repository<br />
svnsync init file:///data/backups/svnsync/your_project/your_svn.synced svn://svn.tuxfamily.org/svnroot/your_project/your_svn/<br />
Update it regularly:<br />
crontab -e<br />
<br />
# Recuperation du depot Subversion de QET (en incremental)<br />
30 08 * * * svnsync --non-interactive synchronize file:///data/backups/svnsync/your_project/your_svn.synced<br />
<br />
This mirror will enable you to dump (and optionally filter) your SVN repository. In case you need to restore such a dump to TuxFamily, please contact the TuxFamily staff.</div>Xavier