« A Silly Story | Main | Protect Directory »
April 07, 2005
How to Transfer a Website Effectively
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.
Category : Tips
Posted by FreeBSD Newbie at April 7, 2005 08:11 PM
