Friday, February 22, 2008

joomla backup and restore struggle with joomlapack

Today I tried to transfer a joomla (joomla 1.0.15) site from one (hosted) server to another. I used joomlapack.
Below are all the necessary steps that worked for me. Both of the sites are safe_mode=on

It is more a note for myself then anything else...

0) get the latest patches / update files from joomla and ftp them to your (old) joomla installation
http://joomlacode.org/

1) get the newest joomlapack files and unpack them locally.
http://www.joomlapack.net/downloads/index.html

2) via ftp: In [joomlapath]/administrator/components/ create a new directory com_joomlapack and make it world writable (for later config file write).

3) copy all the unzipped files from step 1 into that directory

4) ensure that the "[joomla]/installation" directory exists in your (old) installation. Maybe you need to get it from a current joomla full source, because you deleted it on your server... It is no problem to just copy it from a fresh zip archive. Be aware that your site will switch to offline mode as soon as the installation directory exists!
=> during backup joomlapack puts all (!) the database-entries in your current installation in the installation/sql/joomla.sql file for easy restore.

5) call joomlapack extension like this http://[yourserver]/administrator/index.php?object=com_joomlapack
because we just copied the files and did not a true component installation there is no other way to access it. Nevertheless it works great!

6) finetune the joomlapack config: create two folders via ftp (jpbckup, jpbckuptemp or whatever) somewhere in your source and chmod them world-writable. Put these folders as backup and tmp-backup locations in the joomlapack_config dialogue. Take care of the full path! Remember that the ftp path that you see is probably not the real root path of the server.
When there are no red errors anymore (joomlapack can find the path to the backup and tmp directories and can write them and can write the config file

7) backup your joomla installation with joomlapack (use the first option).

8) If you have a running joomla installation on the target server be sure to make steps 1-7 on your target server as well before continuing. - It may be enough to get the configuration.php config file in order not to loose important params (e.g. db connection).

9) download the zip file (via ftp or joomlapack webinterface) that joomlapack created.

10) unpack it locally and transfer the files to your target server, thereby overwriting an existing installation if there is one.

11) delete the configuration.php file on the target server. Because it is from the old installation it will probably not work.

12) go to http://[yournewjoomlaserver] and run through the installation process.
If you get an "restricted access" error, check http://forum.virtuemart.net/index.php?topic=21663
If you only see a blank page, delete your configuration.php file

13) be sure to select "drop tables" and to _not_ select "install sample data" in the appropriate step of the installation

13a) ignore the admin password that you need to enter/accept. And that is shown as a last step of the installation. It will never work, because all accounts and data from your old system will be installed!

14) Delete the installation directory.

15) visit your site. It works exactly like the old one!

1 comment:

digdogart said...

THANK YOU , THANK YOU, THANK YOU! HOURS of trying to use kickstart to restore (migrate actually) my site to another url. I literally wanted to throw my laptop in the pool... Your way worked (except that I didn't have to worry about patches cause I had the latest joomla) I also did not have to remove the config (weird)- I just wanted to let you know you made my day, month, year in fact!