Actions

Talk

Difference between revisions of "Copying a Joomla website"

From Joomla! Documentation

(FTP Info In configuration.php)
 
(9 intermediate revisions by 4 users not shown)
Line 37: Line 37:
 
[[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
+
== This site is undiscoverable ==
are incorrect.
+
  
What's wrong with "tar cvfz joomlabackup.tar.gz"
+
Hi, while being in a state of support frenzy in the Joomla forums I recently made a google search for comprehensible and complete info on how to migrate a Joomla installation to a new server/domain. This wiki page didn't come up.
The "f" parameter expects the filename as the next argument but the "z" is there
+
I think this page needs more keywords like these: moving, migrating, migration, new server, new domain. I think PageRang shouldn't be an issue with this wiki, you just need broader headlines/keywords/tags. [[User:Stroganoff|Stroganoff]] 00:36, 29 June 2009 (UTC)
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
+
Improvements to this, or any, page are welcome. It's a wiki; everyone has write access. :)  [[User:Chris Davenport|Chris Davenport]] 07:35, 29 June 2009 (UTC)
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
+
== FTP Info In configuration.php ==
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:
+
This article doesn't include the fact that you will need to chang FTP info in the configuration.php file along with the log and tmp paths. I know that this is simple, but for newbs like myself I thought I would include that in here. You need to go into the configuration.php file and edit
  cd /path_to_joomla
+
       
  tar xvfz /home/myaccount/joomlabackup.tar.gz
+
        <font color="blue">var</font> <font color="#2B3856">$ftp_host</font> <font color="purple">=</font> '123.0.0.4'<font color="purple">;</font>
or if you have a backup dir next to your joomla install:
+
        <font color="blue">var</font> <font color="#2B3856">$ftp_port</font> <font color="purple">=</font> '21'<font color="purple">;</font>
cd /path_to_joomla
+
        <font color="blue">var</font> <font color="#2B3856">$ftp_user</font> <font color="purple">=</font> 'example'<font color="purple">;</font>
tar xvfz ../my_bcakup_dir/joomlabackup.tar.gz
+
        <font color="blue">var</font> <font color="#2B3856">$ftp_pass</font> <font color="purple">=</font> 'abc123'<font color="purple">;</font>
 +
        <font color="blue">var</font> <font color="#2B3856">$ftp_root</font> <font color="purple">=</font> '/public_html'<font color="purple">;</font>
  
Now the actions as stated in "Extracting an archive file" will almost work.
+
to include your information under ftp_host, ftp_user, and ftp_pass, and possibly the other variables depending upon your particular situation.
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"
+
Cody Ham
the location where you wanna create a new copy.
+
 
+
/Arthur
+

Latest revision as of 15:44, 4 April 2012

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)

Contents

configuration.php vars

Hi,

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?

Greets

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: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

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)

This site is undiscoverable

Hi, while being in a state of support frenzy in the Joomla forums I recently made a google search for comprehensible and complete info on how to migrate a Joomla installation to a new server/domain. This wiki page didn't come up. I think this page needs more keywords like these: moving, migrating, migration, new server, new domain. I think PageRang shouldn't be an issue with this wiki, you just need broader headlines/keywords/tags. Stroganoff 00:36, 29 June 2009 (UTC)

Improvements to this, or any, page are welcome. It's a wiki; everyone has write access. :) Chris Davenport 07:35, 29 June 2009 (UTC)

FTP Info In configuration.php

This article doesn't include the fact that you will need to chang FTP info in the configuration.php file along with the log and tmp paths. I know that this is simple, but for newbs like myself I thought I would include that in here. You need to go into the configuration.php file and edit

       var $ftp_host = '123.0.0.4';
       var $ftp_port = '21';
       var $ftp_user = 'example';
       var $ftp_pass = 'abc123';
       var $ftp_root = '/public_html';

to include your information under ftp_host, ftp_user, and ftp_pass, and possibly the other variables depending upon your particular situation.

Cody Ham