By lagerassassin on
Ok a bit of expert advice would be greatly appreciated as I'm a bit of a n00b in this area...
I am moving hosts from justjoke.... sorry justhost to a vps
I have a full backup of my site but can't find the htaccess file (apparently this is commonly hidden from justhost)
I need to know the best way to restore my drupal site onto the new server/host
Should I just upload my full backup from my old host..
Do a new installation of drupal and start a fresh adding my existing Mysql database to it (advice on that would be great too!)
Or something else.... or am I doomed?
Anyone who can help would have my upmost gratitude!
Comments
Sure... One way to ensure you
Sure...
One way to ensure you don't leave behind the hidden files is to use an FTP program that has an option for displaying hidden files (I'm not sure on windows if you use that, maybe Filezilla... I use Transmit on Mac and it has it). Alternately, if you have cPanel on your old host, you might prefer to make a backup of your site's files using that (or SSH if you have and are comfortable with it). Using the cPanel file manager you should be able to see hidden files (those that start with a dot), and also can use the Compress option (top toolbar) to make a full backup of your site's files, including any hidden files. If your new host has cPanel or something similar, you could then upload the whole backup file and decompress it on the new host. If you do this, you might end up with files with the old server's user/group, so you might have to use the chown command on them (ask your host if it comes to this).
You should also export the database of your site, either using cPanel, phpMyAdmin, or SSH... however you prefer. If you know how, I personally always empty the cache, watchdog, and sessions tables before moving a site to a new server (makes the file much much smaller).
After your files are in place on the new server, make a new empty database with cPanel or whatever tool your host provides. Do NOT install Drupal from scratch into it. Instead, import your database backup into it, most likely with phpMyAdmin or a similar tool. Edit your site's settings.php file to point to the new database information, and hopefully your site will come up on the new server just like you expect.
Be sure to check the permissions of your files directory (usually at sites/default/files, or elsewhere if you chose a different location for them). Once Drupal is up and running, go to the Site configuration > File system and see if Drupal tells you here that it can no longer write to the files directory. Make sure the permissions are writable, and make sure that the server can write into the directory (this means that the "apache" user has to own the folder, which is usually named the odd name "nobody", though it might vary depending on your server setup... you can ask your host to set this, or if you want,
chown -R nobody:youruser your/files/directory).Hope this helps! :)
I moved a cPanel account from
I moved a cPanel account from a shared host to a VPS recently.
I set aside a whole day for it, but in fact I was done in two hours (including the 500mb transfer of the account).
You can do the following if you have:
- cPanel on both servers
- WHM access on the new server
- SSH root access (or a Parallel Virtuozzo container) on the new server
In the WHM of your VPS, create a new cPanel account called 'transfer' (ie use 'transfer' for the username). This is just simply to create an ftp account; you'll delete it straight after the migration. You don't need a domain for it - just use transfer.com when creating the account. The ftp account will therefore be accessed using the VPS IP address on port 21, using the username and password for the 'transfer' cPanel.
Log into the cPanel account on the old server (the one your are transferring from)
Go to Backup --> Generate/Download a Full Backup
Select the backup destination: 'Remote FTP Server'
Specify an email address for the verification message (it emails you once the transfer is done), and enter the ftp information for the 'transfer' cPanel account, which you created on the new VPS server.
Click 'Generate Backup. This will move your old cPanel account to your VPS.
The backup will be one file called something like: backup-DATE_TIME_USERNAME.tar.gz
This should include absolutely everything, including databases, hidden files, and email accounts.
The file will be placed ABOVE the public_html folder, in the WHM home/transfer directory.
You'll be emailed when it is done. My 500mb site took 40mins.
Now copy the backup out of the /home/transfer directory, and into the /home directory
If you have Virtuozzo, you can avoid using SSH command lines.
Try to access virtuozzo at:
https://your VPS IP address:4643/vz/cpIf you've got it, use the filemanager to copy the backup from /home/transfer to /home
One thing to watch is that the filemanager only lists twenty files. Click '40' at the top right to see your backup.
If you haven't got Virtuozzo, log into SSH as the root user (I use 'Putty' for Windows)
Type: cd ../
Type: cd home/transfer
Type: ls
You should be able to visually confirm that your backup tar.gz is there.
Move the backup file to the /home directory by typing
cp FILENAME.tar.gz ../home
(where filename is the actual name of the file).
I'm not sure if these commands are 100% correct - I'm doing this from memory.
You can type: cd /home/ then ls to confirm that the file has been moved.
Log into WHM on your new server and navigate to 'Backup --> Restore a Full Backup/cpmove file'
On this page you should see the file listed under: 'Possible cpmove archives found:'
In the field 'Enter the username for the account you wish to restore', type in username ('transfer' in this case). This identifies the name of the backup file, but the actual restore will use the username used on the cPanel account on the old server.
Click 'Restore'
The backup file in the home directory will be deleted after restore, but you still have a copy in home/transfer
You will now have an exact replica of the old cPanel account on your VPS, in home/USERNAME
It will have also created your databases and databases users.
Access your cPanel using:
http://your VPS IP address:2082/~USERNAMEand the same username password as the old cPanel account.
The website is accessed at
http://your VPS IP address/~USERNAMEAlthough, because you now have USERNAME in the url, it won't display properly. (eg. no images)
How you take the migration from there really depends. Remember that the old site is still up and running, so you have plenty of time to work out what action to take next to test the installation, and how to minimise any downtime when you switch the domain over to the new server.
Thanks to both
For your amazing replies, I shall get onto this and see how I do, nice to know people are out there to take the time out of their day to help....
again, thankyou :)
Thanks to both
For your amazing replies, I shall get onto this and see how I do, nice to know people are out there to take the time out of their day to help....
again, thankyou :)