Restore site from mysql dump procedure?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
- adrian_vg
- Joomla! Intern
- Posts: 72
- Joined: Wed Apr 23, 2014 3:06 pm
- Location: Sweden
Restore site from mysql dump procedure?
Hello all,
A power outage fried my server a few days ago but I have nightly mysql dumps done as well as joomla directory tar files created, then transferred off-site.
I spent most of the day yesterday trying to restore my joomla site to a new server but failed miserably.
Is there any particular order to follow to achieve restoring the most recent joomla dump on a new server?
All done on CentOS 6.9 x64.
Lastly tried:
1. Httpd install.
2. Install php70w.
2.5 Install mysql.
3. Set up Nextcloud.
4. Set up ssl certificates.
5. Nextcloud tested and works.
5.5 Extract joomla directory tar to /var/www/html/joomla.
6. Create joomla database.
7. Create joomla user, set password same as on old server.
8. Grant joomla user all rights.
9. Import joomla mysql dump.
10. Install joomla and use the cred's from §7.
11. Remove installation dir.
12. Press site button.
13. Get "Error" on otherwise white page.
Could the db prefix be the problem? I've tried using both the same prefix from old site as well as letting the joomla installer randomly choose a new prefix. Neither worked, still getting the "Error".
What am I missing?
Any help and hints are greatly appreciated!
Thanks.
A power outage fried my server a few days ago but I have nightly mysql dumps done as well as joomla directory tar files created, then transferred off-site.
I spent most of the day yesterday trying to restore my joomla site to a new server but failed miserably.
Is there any particular order to follow to achieve restoring the most recent joomla dump on a new server?
All done on CentOS 6.9 x64.
Lastly tried:
1. Httpd install.
2. Install php70w.
2.5 Install mysql.
3. Set up Nextcloud.
4. Set up ssl certificates.
5. Nextcloud tested and works.
5.5 Extract joomla directory tar to /var/www/html/joomla.
6. Create joomla database.
7. Create joomla user, set password same as on old server.
8. Grant joomla user all rights.
9. Import joomla mysql dump.
10. Install joomla and use the cred's from §7.
11. Remove installation dir.
12. Press site button.
13. Get "Error" on otherwise white page.
Could the db prefix be the problem? I've tried using both the same prefix from old site as well as letting the joomla installer randomly choose a new prefix. Neither worked, still getting the "Error".
What am I missing?
Any help and hints are greatly appreciated!
Thanks.
Last edited by toivo on Wed Jun 20, 2018 8:47 am, edited 1 time in total.
Reason: mod note: marked as solved on request
Reason: mod note: marked as solved on request
--
//AvG
//AvG
- pmleconte
- Joomla! Guru
- Posts: 591
- Joined: Fri Mar 17, 2017 12:55 pm
- Location: France
Re: Restore site from mysql dump procedure?
Hi,
SQL dumps do not contain your full environment, you'd better use akeeba backup to save everything, but it's too late, isn't it ?
I think you should try to install Joomla (point 10) before importing your sql dump (point 9).
Your blank page is because you are trying to access a not existent component/module or plugin. So, try to disable them from your new install using phpmyadmin. If it works, you'll have to reinstall them later.
Just hope it helps you,
Pascal
SQL dumps do not contain your full environment, you'd better use akeeba backup to save everything, but it's too late, isn't it ?
I think you should try to install Joomla (point 10) before importing your sql dump (point 9).
Your blank page is because you are trying to access a not existent component/module or plugin. So, try to disable them from your new install using phpmyadmin. If it works, you'll have to reinstall them later.
Just hope it helps you,
Pascal
If anything can go wrong, it will.
https://www.conseilgouz.com/en
https://www.conseilgouz.com/en
- adrian_vg
- Joomla! Intern
- Posts: 72
- Joined: Wed Apr 23, 2014 3:06 pm
- Location: Sweden
Re: Restore site from mysql dump procedure?
Thanks. I'll give it a go.
I have a follow-up question though.
Most, if not all tutorials regarding Joomla backups mention mysqldump to backup the joomla database.
Eg this (first hit on Google); https://www.siteground.com/tutorials/jo ... _using_SSH.
If the mysqldump isn't good enough, why is it at all mentioned?
Especially when considering that mysqldump is an official backup method according to
https://docs.joomla.org/Backup_Basics_f ... !_Web_Site.
I have a follow-up question though.
Most, if not all tutorials regarding Joomla backups mention mysqldump to backup the joomla database.
Eg this (first hit on Google); https://www.siteground.com/tutorials/jo ... _using_SSH.
If the mysqldump isn't good enough, why is it at all mentioned?
Especially when considering that mysqldump is an official backup method according to
https://docs.joomla.org/Backup_Basics_f ... !_Web_Site.
--
//AvG
//AvG
- pmleconte
- Joomla! Guru
- Posts: 591
- Joined: Fri Mar 17, 2017 12:55 pm
- Location: France
Re: Restore site from mysql dump procedure?
I use daily database backups which contain the latest version of my websites, but, each time I install a component or update them, I perform a akeeba backup which contains everything.
If you read https://docs.joomla.org/Backup_Basics_f ... !_Web_Site, it says
If you read https://docs.joomla.org/Backup_Basics_f ... !_Web_Site, it says
PascalIf you do not backup your files and database, your backup is incomplete.
If anything can go wrong, it will.
https://www.conseilgouz.com/en
https://www.conseilgouz.com/en
- pmleconte
- Joomla! Guru
- Posts: 591
- Joined: Fri Mar 17, 2017 12:55 pm
- Location: France
Re: Restore site from mysql dump procedure?
I don't understand what you mean by "Install Joomla" (point 10) and "remove installation dir" (point 11).
Is it a "clean Joomla" installation process ?
As you have your full Joomla environment in a tar file, maybe you could just restore it.
Pascal
Is it a "clean Joomla" installation process ?
As you have your full Joomla environment in a tar file, maybe you could just restore it.
Pascal
If anything can go wrong, it will.
https://www.conseilgouz.com/en
https://www.conseilgouz.com/en
- adrian_vg
- Joomla! Intern
- Posts: 72
- Joined: Wed Apr 23, 2014 3:06 pm
- Location: Sweden
Re: Restore site from mysql dump procedure?
To clarify;pmleconte wrote:I don't understand what you mean by "Install Joomla" (point 10) and "remove installation dir" (point 11).
Is it a "clean Joomla" installation process ?
As you have your full Joomla environment in a tar file, maybe you could just restore it.
Pascal
10. Installing Joomla; I unzip the joomla package from joomla.org and dump the contents to an empty joomla folder in /var/www/html. Then I point my web browser to the host and start the install wizard where I enter the site name, user names, passwords etc. This is also where I point the installer to my already imported mysql db.
11. When the installer is done it can't remove the installation folder by pressing the button. I have to do a rm -rf installation/.
It is a clean install first. After I've imported the db I merge the tarred files and folders to the clean install.
I have the full environment indeed, but the restored site won't show, I only see the empty new one.
--
//AvG
//AvG
- adrian_vg
- Joomla! Intern
- Posts: 72
- Joined: Wed Apr 23, 2014 3:06 pm
- Location: Sweden
Re: Restore site from mysql dump procedure?
<GASP!!!> I did it!!
Seems like the mysql db had some left-overs from my previous attempts, as well as mismatched joomla users matched to to several (wrong) joomla db's. After cleaning up in mysql I got my old site back!
Can you imagine how relieved I am??! :-D
Edit: I'm getting a new UPS after next salary...
Edit2: FWIW, for all intents and purposes §§5.5-11 is the procedure to follow. A tarred backup of /var/www/html/joomla and a recent sqldump should be enough.
Seems like the mysql db had some left-overs from my previous attempts, as well as mismatched joomla users matched to to several (wrong) joomla db's. After cleaning up in mysql I got my old site back!
Can you imagine how relieved I am??! :-D
Edit: I'm getting a new UPS after next salary...
Edit2: FWIW, for all intents and purposes §§5.5-11 is the procedure to follow. A tarred backup of /var/www/html/joomla and a recent sqldump should be enough.
--
//AvG
//AvG
- adrian_vg
- Joomla! Intern
- Posts: 72
- Joined: Wed Apr 23, 2014 3:06 pm
- Location: Sweden
Re: Restore site from mysql dump procedure?
I'd be grateful if a moderator could mark this thread as [Solved] for posterity.
Thanks to all for their hints and comments!
Thanks to all for their hints and comments!
--
//AvG
//AvG