Last active
February 23, 2016 07:03
-
-
Save faizanayubi/d5f00b5e2adc92e29c6f to your computer and use it in GitHub Desktop.
Shift a server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. tar a file | |
tar -cf folder.tar folder/ | |
2. Backup database | |
mysqldump -uroot -p database_name > dumpfilename.sql | |
3. transfer files to server | |
wget -m --ftp-user=cloudstuffs --ftp-password=pass123 ftp://ftp.cloudstuffs.com/public_html.tar | |
or | |
scp [email protected]:/home/vijay/webackups/milan/www.tar /var/www/ | |
4. untar a file | |
tar -xvf public_html.tar | |
5. move files to public_html | |
tar -xvf public_html.tar | |
mv -v public_html/* /directory/to/move | |
6. Restore database | |
mysql -uroot -p database_name < dumpfilename.sql | |
7. Change uploaded file permission | |
chown -R username:groupname foldername |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment