Manual backup and restore to a different domain name

Permalink
I'm running C5.6
I can't do a backup from the C5 dashboard because it times out and I'm on shared hosting and can't do much with whatever it takes to make that work.

So what would I need to do to backup via my hosting cPanel/PHPMyAdmin or FTP?

I'm assuming I can backup the database via PHPMyAdmin, but hadn't done it before so not sure which database, and would I also need to FTP the files, or does doing a backup of the database cover all the files too?

Lastly, I want to restore it to a different domain. If I restore it would all the links still work? I believe they'd all be relative links right? Like {CCM:BASE_URL}/folder/filename

So backing up from mydomain1.com and restoring to newdomain2.com, would that even work, or would all the links be broken?

Sorry if dumb question, been using C5 for many years but never had a need to restore to a new domain.

(and yes I know I should be backing up my website myself, but my hosting service is good for that so far but I'm going to do it myself also just in case...)

dibbc
 
mesuva replied on at Permalink Reply
mesuva
In cPanel have a look in the Backups section. In there, there's a button to download a zip of your files in your home directory, as well as links to trigger database download dumps.

If I'm transferring a site or backing it up, I just grab the home directory and then the database. When you unzip the home directory backup, the public_html folder is in there with everything file related. I then just zip that folder up (as all the others are to do with mail, etc), and upload that to the new host, unzipping it into public_html.

I then restore the database and update /config/site.php to have the new database details.

The backup of the database doesn't include any files.

To work out what database you are using, just have a look at /config/site.php, the database currently in use will be used in there.

When you copy it across, the links should be all relative, but you may need to turn off and on your cache, or clear it. Occasionally hard-coded links can sneak in, but if you've used concrete5's controls to add links you should fine.
dibbc replied on at Permalink Reply
dibbc
Ah yes, I see the backup section of cPanel and looks like a pretty easy download.

One more question about the database, so when I create a database on my host, it prepends (is that the word?), something to the beginning of the database name.

Like all my databases are called:
therap1_this
therap1_that
therap1_another
therap1_etc

But when I created the databases I only told it to name them this, that, another, etc, and it added the "therap1_" part of the name.

Now, when I restore the database to a new domain, it has a different prefix for the database names.

Will I be able to restore my therap1_whatever database to another server and have it keep that same name? I'm assuming if it changes the prefix it will really break everything.

Did any of that make sense the way I described it?
mesuva replied on at Permalink Reply
mesuva
The name of the database doesn't matter, when you create a backup it's just the table structure and the data.

You can create a new blank database of a completely different name and import the dump.

All you have to do is change the /config/site.php to the name of the new database. If it's got all the tables and data in it you're good to go.
dibbc replied on at Permalink Reply
dibbc
Thanks, I'm going to restore in the morning, will post back with how it goes. Really appreciate the info.

Edit: But aren't there something like php db connect commands in the code that would be looking for the original "therap1_that" database name?