Overview

These documentation pages are no longer maintained. Please visit the new documentation site.

Just an overview....

For a backup of an ez3 (or ez2) system, you can use the backup-script " reoback".

Backup

  1. (for ez2, optional:) Call your cron-job to do a session cleanup and so on, thus minimizing your session* tables in the DB
  2. Do a backup of your Database. For MySQL, we use mysqldump to dump one ez Database into a text file.
  3. Use reoback to backup your complete ez3 directory, the database dump, that was created by mysqldump and maybe your Apache configuration. This should give you one nice tar.gz of your site.

Restore

Reverse the backup process :

  1. Unpack your tar.gz to re-create the files
  2. re-recreate your database by importing your DB dump (like mysql my_database if necessary, restore your apache config (httpd.conf) and restart your webserver

General Notes:

  • For consistance's sake, try to backup the files at the same time or directly after the database.
  • Reoback can be used to copy or move your backup files to some other server using FTP or NFS. I would recommend this. If you don't have some other server/webspace, that you can FTP to, you need to download the backup files to some client (probably manually, except your client is running all the time). Beware of huge files!
  • Reoback can be used to do incremental backups.
  • This process can be used to port/copy/clone any ez site. Just restore to some other place/server and adapt your .ini's.
  • Of course, you should automate the process by using the server's cron system and some small Perl scripts.

PS: Can any MySQL guru please comment, if mysqldump really is the best choice for doing a consistant dump (=is the DB locked)? Regarding mysqldump: If you use the -l or --lock-tables option when using mysqldump, it will lock all tables in a database (not across all databases, just one at a time). There's also the --add-locks option which will lock each table separately but it does not guarantee consistency across a database.

<li>if necessary, restore your apache config (httpd.conf) and restart your webserver</li></ol>General Notes:<ul> <li>For consistance's sake, try to backup the files at the same time or directly after the database. </li> <li>Reoback can be used to copy or move your backup files to some other server using FTP or NFS. I would recommend this. If you don't have some other server/webspace, that you can FTP to, you need to download the backup files to some client (probably manually, except your client is running all the time). Beware of huge files!</li> <li>Reoback can be used to do incremental backups. </li> <li>This process can be used to port/copy/clone any ez site. Just restore to some other place/server and adapt your .ini's. </li> <li>Of course, you should automate the process by using the server's cron system and some small Perl scripts.</li></ul>PS: Can any MySQL guru please comment, if mysqldump really is the best choice for doing a consistant dump (=is the DB locked)?<strong>Regarding mysqldump</strong>: If you use the -l or --lock-tables option when using mysqldump, it will lock all tables in a database (not across all databases, just one at a time). There's also the --add-locks option which will lock each table separately but it does not guarantee consistency across a database.</paragraph></sec
if necessary, restore your apache config (httpd.conf) and restart your webserver

General Notes:

  • For consistance's sake, try to backup the files at the same time or directly after the database.
  • Reoback can be used to copy or move your backup files to some other server using FTP or NFS. I would recommend this.
    If you don't have some other server/webspace, that you can FTP to, you need to download the backup files to some client (probably manually, except your client is running all the time). Beware of huge files!
  • Reoback can be used to do incremental backups.
  • This process can be used to port/copy/clone any ez site. Just restore to some other place/server and adapt your .ini's.
  • Of course, you should automate the process by using the server's cron system and some small Perl scripts.

PS: Can any MySQL guru please comment, if mysqldump really is the best choice for doing a consistant dump (=is the DB locked)?

Regarding mysqldump: If you use the -l or --lock-tables option when using mysqldump, it will lock all tables in a database (not across all databases, just one at a time). There's also the --add-locks option which will lock each table separately but it does not guarantee consistency across a database.

Comments

Postgresql dump

pg_dump ezdb -Uezusr > this_is_the_dumpfile
then
psql ezdb -Uezusr < this_is_the_dumpfile

There is a -d or -D option of the pg_dump - depending on it you can use inserts or inserts-columns instead of the "copy". Or you can change --format=format, if you want e.g. a tar archive format.

Mysqldump

I don't use mysqldump to do the database backup, because it is lame and uses to much resources.

I would prefer mysqlhotcopy or some similar technique that works with binary dumps.

Also one idea would be using database replication. That what you can lock your replicated DB, dump it and unlock it again. With out any effect on the master DB.

Prove me wrong ;-)... I am just throwing ideas around.

Contents

Configuration

Configuration
Security
Optimization
Backup & Restore
    Move to new provider
    Overview
Troubleshooting


Created

03/05/2003
12:13:28 pm
by Marco Zinn

Last updated

04/07/2003
2:44:15 pm
by Bård Farstad

Authors

Marco Zinn
Hans Melis
Bård Farstad



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.