March 15, 2007

Website Shifting (All files & DataBase)

Here is the method for Shifting your website & database from one server to another with simple steps. This works only on Linux server.

Steps to follow on Existing(Source) Server:
1. Move in the root folder of project i.e. change the directory
cd /path/to/dir

2. Compress the website(project) folder
tar -cvf xxxx.tar * (Supposing 'xxxx' is the name of project)

3. Export the Database in a tar file
mysqldump dbName -u dbUserName -p > dbFileName.tar
Password: myPassword

example:
mysqldump xxxx -u root -p > xxxx_DB_Backup.tar
Password: password

4. Copy the tar files to New server, where you want to shift (move) the website
scp xxxx.tar RemoteUserName@RemoteIP:/path/to/dir/xxxx.tar
Password: (password for that user of Remote IP)

example:
scp xxxx.tar root@127.0.0.1:/home/xyz/public_html/xxxx.tar
Password: myRootPassword

scp xxxx_DB_Backup.tar root@127.0.0.1:/home/xyz/public_html/xxxx_DB_Backup.tar
Password: myRootPassword

Steps to follow onNew(Target) Server:
1. Move in the root folder of project, where you have copied the compressed file
cd /path/to/dir

2. UnTar the tar file
tar -xvf xxxx.tar

3. Import the Database
mysql myDbName -u
dbUserName -p < dbFileName.tar
Password: myPassword

3 comments:

Deepak singh said...

Please tell me whether it require any changs in the databases while shifting the website to another server.Please reply me positvely.

Akash Dwivedi said...

No need to make any changes in the database.
Sorry for delay in response. Please feel free for any query :)

halogabrielsen said...

Online gambling firms might be compelled to tell their prospects “chances are you’re about to lose” beneath model new} algorithm within the National Consumer Protection Framework. “I suppose that what is exclusive about Playtika is that when you take a look at|have a look at} the mix of staff, most of them usually are not gamers. 카지노 We have glorious technologists, analysts, and synthetic intelligence engineers. Because our workers displays the Israeli high-tech business as a whole.