How to Transfer a Website Effectively
April 7, 2005 Posted by KP
Tar command is the most effective way to transfer a website between servers:
1. On old server
Package DB data
# cd /var/db/mysql/db_name/
# tar cvzf /home/account_name/accountdb.tar.gz *
Package all files under the account’s home directory.
% cd /home/account_name
% tar cvzf account.tar.gz *
2. On new server
Add a new user with the same account name, also create a database for it.
Get the gz file with ftp from the old server and unpack it.
% cd /home/account_name
% tar xvf account.tar.gz
Unpack DB data.
# cd /var/db/mysql/db_name/
# tar xvf /home/account_name/accountdb.tar.gz
The website should be ready after updating named and Apache configuration file.
Related Posts:
Filed Under: Tips