Today I want to give some hints at creating a working backup of a typo3 installation.
Installing an additional typo3 extension can obviously be a good possibility if you have to backup just one or two setups. There seem to be a few really handy ones. But in my case this would be very ineffective. First, you have to install another extension for every running typo3. Then doing the saving stuff on console can have some advantages like cron tabbing etc. That is why I decided to do it “by hand”.
The first step is loggin into the server, of course:
$ ssh xxx@xxx.xxx
… and go to the typo3 base dir:
$ cd /path/to/typo3/
Then we dump the data base:
$ mysqldump -u<db username> -p<db password> -h<db host> --opt > mysql_dump.sql
According to the manual the –opt should be turned on by default but I made the experience that this is not everytime the case escpecially on older installations. With this option maked as deactivated your backup can be nearly useless!
Now you should check if the output is ok
$ less mysql_dump.sql
Archive the customized directories of typo3 including our new dump
$ tar cjvf typo3_backup.tar.bz2 fileadmin typo3conf uploads mysql_dump.sql
Following the description of Jason Lefkowitz it could be useful to include the used version of typo3 in the backup. The sources can be fetched from Sourceforge.
These description is just a collection of ideas. Please check them for yourself to avoid damage to your soft- or hardware or data loss!
Thank you for blogging about TYPO3.
Alternately, there’s a few TYPO3 extensions that be installed directly into TYPO3 for backup purposes.
One of my favorites is w4x_backup. It’ll dump the database and only tarball up the fileadmin, typo3conf and uploads directories. Very much like your own thoughts.
w4x_backup is great for quick development to production server moves where both TYPO3 instances are of the same TYPO3 version.
Kommentar von Michael Cannon — 16. Februar 2009 @ 04:11