Difference between revisions of "Copying a Joomla website"

From Joomla! Documentation

(Format of mysqldump statement (again))
Line 36: Line 36:
part for those of us that don't run our own dedicated database servers.  
part for those of us that don't run our own dedicated database servers.  
[[User:Oskay|Oskay]] 04:57, 31 August 2008 (EDT)
[[User:Oskay|Oskay]] 04:57, 31 August 2008 (EDT)
The tar command in this wiki will not work and if they did work the combination of commands
are incorrect.
What's wrong with "tar cvfz joomlabackup.tar.gz"
The "f" parameter expects the filename as the next argument but the "z" is there
so the the tar command should be "tar zcvf joomlabackup.tar.gz"
The tar command "tar cvfz joomlabackup.tar.gz /path_to_joomla" will create a file archive
with absolute path from the root dir to the joomla_location.
Now you can only restore your Joomla to exactly the same location; so you can't make a copy on
the same system and on a other system you can only restore to the exact same location.
So to avoid this the tar should be crated with out the path_to_joomla but you also would like
to create the tar file outside the joomla directory tree. You can do this by telling tar where
to create the tar file.
Backup will look like this:
  cd /path_to_joomla
  tar xvfz /home/myaccount/joomlabackup.tar.gz
or if you have a backup dir next to your joomla install:
cd /path_to_joomla
tar xvfz ../my_bcakup_dir/joomlabackup.tar.gz
Now the actions as stated in "Extracting an archive file" will almost work.
cd /path_to_joomla
tar xvfz /path_to_your/joomlabackup.tar.gz
chmod -R www-data.www-data *
The "/path_to_your" is only needed if the tar file is not stored in "/path_to_joomla"
the location where you wanna create a new copy.

Revision as of 04:07, 7 September 2008

its very important to note that when you run the tar command you are NOT in the directory you are backing up or you will create an endless loop as it will continously sit there and try to backup the backup file.

Thanks. I can see you have already made the change. Chris Davenport 12:28, 25 March 2008 (EDT)

configuration.php vars


in configuration.php vars $log_path and $tmp_path should be edited to point to the correct paths. Or does J! 1.5 do this automatically after first backend login?


afaik it does and they're set by the installer. If unedited, both default to JPATH_ROOT + "tmp" and "log" respectively. --CirTap (talkcontribs) 05:51, 23 July 2008 (EDT)

Format of mysqldump statement ?

In this article the mysqldump statement is noted like:

mysqldump -u user -p db-name > db-name.out

Shouldn't it be

mysqldump --user=username --password=password database > dumbfile.sql

instead (so with double "--" ) see:

Both forms should work. Chris Davenport 08:58, 26 August 2008 (EDT)

Format of mysqldump statement (again)

I realize that I'm probably the first person person to actually try to copy a Joomla site, but it would be really helpful if this page gave a working mysqldump statement for reference. I'd suggest including the

-h [servername]

part for those of us that don't run our own dedicated database servers. Oskay 04:57, 31 August 2008 (EDT)