PDA

View Full Version : Getting new host


Racer23
13th of June 2006 (Tue), 19:59
Ok I am going to be getting a new webhost thisweekend (ixwebhosting.com thanks for the link). I want to know if I can do anything to preserver my database and all my files and images for the changeover? And what do I do?

THanks

Pekka
13th of June 2006 (Tue), 20:14
This is quick overview of moving EE from old server to a new server:

1. Backup EE database:

You must use EITHER EE Backup OR mysqldump.

If you use EE Backup, you select the EE database from list and save the dump to a file. Then you upload with ftp the file to new server, into EE Backups ee_backup_files -folder and restore it from there using new server's EE Backup (ee_backup_prefs/preferences.php set up properly, of course).

If you use mysqldump you need to make a database dump in current server, for example

mysqldump --user username --password=password databasename --add-drop-table --lock-tables --add-locks -e -a -c > databasename.sql

If you use windows the easiest way is to find mysqldump program (usually in C:\mysql\bin ), open command prompt and drop the mysqldump.exe on to it and then add the parameters. When the dump is saved, you upload the dump into new server and using server's shell access you find the dump and give command:

mysql -u username -p databasename < databasename.sql

Mysql will promt for password and restore the dump after you give it.

The main difference between EE Backup and mysqldump is the EE Backup does not require shell access and that mysqldump can handle mismatched mysql versions better.


2. Backup all photos

FTP to your current server and download EVERY folder with photos. Download also EE files, if you have made changes to them.

3. Upload to new server

Upload all (photos, EE files with database dump) to your new server, keep the folder structure same as in old server.

4. Restore the database dump

If you use EE Backup, you'll need to edit its preferences with new database passes. NOTE THAT if database in new server is OLDER VERSION MYSQL, you might need to edit the dump manually to fix some commands.

5. Set EE folder permissions (777)

GALLERY/temp
GALLERY/ftp_temp
GALLERY/export
GALLERY/input/temp
GALLERY/input/UPLOAD
GALLERY/input/UPLOAD/test
GALLERY/input/UPLOAD/ee_temp_upload
GALLERY/input/backup/ee_backup_files

6. Change database passes

add/connect.php needs editing!

7. Go to EE editor and change ftp paths to match the new server

Use normal ftp program to check the correct path with PWD command. In FTP editor change username and pass and test all.

8. Test Imagemagick

You might need to adjust imagemagick settings (also sharpening), test all graphics modules and then all resize methods.

NOTE: if you say NO to e.g. imagemagick test and it WAS assigned to size paths, all paths using it will be reset to NONE. Be careful what you do and why to avoid extra work.


Test that all works. That should do it.

Racer23
14th of June 2006 (Wed), 16:00
Now if I do the EE_backup I need to reinstall 1.5 on the new server (of course) then to the restore function. If I upload into the parent directory which I assume is public_html then will the paths be empty or show my previous servers settings?

Sorry for my questions I have never backed up and transfered php or mysql stuff before.

Pekka
14th of June 2006 (Wed), 17:33
You do not have to install EE. Just upload all EE files and then restore the backup.

if your old server was

/public_html/gallery
/public_html/gallery/photos

In new server make same folder structure to html root (which can be anything like "/public_html or "/sites/www/public" etc):

/new_html_root/gallery
/new_html_root/gallery/photos

EE size paths work with http URLs, they show where the image is found. If your domain name stays same, and you use same folder structure then you do not have to change URLs. Size path FTP folder tells EE where to upload files. FTP folder must point to same folder on server as URL, only that it is ftp path (relative to root path of ftp login), not http path.

Racer23
14th of June 2006 (Wed), 18:45
ok great thanks. I did the backup today and hopefully will have everything on a new server by monday..