Administration » Backing up

Backing up

This document has been appended to... please see the better, more modern version HERE.

Depending on how important your site is to you, it's important to keep backups of the different elements that form your site. Backups will come in handy if, for whatever reason, your website stops functioning properly.

Which backups do I need?

The database

This is the most important backup when it comes to the content of your site. All of your users, permission structures, templates, snippets, pages and so forth are stored in the MySQL database you installed Etomite in.

There are two ways to create this backup. The easiest one might be to use the MySQLdumper snippet. This snippet creates a standard SQL dump of all the tables in the database Etomite uses. Alternatively, you could make a dump of your database using your favourite MySQL management tool (e.g. phpMyAdmin).

A giant database dumpfile is great to have in case your entire database gets corrupted or the entire MySQL server crashes. However, it's not very practical if you want to recover 1 snippet that you messed up. We'll get to that.

Your files

Apart from the database entries, most likely your site will also use CSS files, images and maybe other files. That's why it's a good idea to make regular backups of your site's file structure. You can do that by simply copying your Etomite folder (e.g. /usr/httpdocs or /data/www) to your hard disk using FTP. FTP backups come in handy in case of upgrades ‘gone wrong'.

Templates, snippets & chunks

While technically you already have everything covered, you might want to make your life easier by keeping some backups of your templates, snippets & chunks. Just in case you mess one up and you can't find out where it all went wrong. The simplest way to create these backups is to copy/paste the content of your snippets to your favourite text-editor and save them on your hard-drive.

Important

The most important issues regarding backups are: "How often do I back up" and "Where do I keep my backups". Well, you have to sort that out yourselves. In general, when you have a very dynamic site you have to make backups more often. And I shouldn't store my MySQL dumps on the same server as the database is stored.