Backup & Restore data on VPS?

Jovani

Active member
Joined
Jul 10, 2012
Messages
338
Points
28
After 1 month studied VPS and installed some things on it, now it's right time to think about backup my works/data did.
What are best ways to backup and restore my backup on VPS?

Any tips?
 

yestyle

New member
Joined
Jul 1, 2012
Messages
189
Points
0
Hey Jovani, If you installed some web hosting control panel like Directadmin, Cpanel, webmin..then it's easy for you to backup file through graphic interface..but if you don't have..then it's not problem. I can show you some tips below to backup and restore via commands

Back up files on a VPS
Backup your files, should understand it simply brings all the folders and files in a website put into a zip file, then you can download to your computer or do something you like.

3 steps to back up files website:

cd into the directory of the public domain.
Use the zip command (see below).
Download by typing the address in your browser.

Move to working folder
Code:
cd path/to/your/directory
zip all files in folder will be.
Code:
zip -r nameforallzipfile.zip *
In particular, nameforallzipfile.zip the file name that you want to zip it after finished and the asterisk means that it will cover all the files in current folder you are working on.

For example, I want to zip all the files and folders of a domain on my VPS, I will do the following steps:

Access to the directory to zip.
Code:
cd /home/domains/webmastersun.com/public_html
Type the command and save the zip file is webmastersun.zip.
Code:
zip -r webmastersun.zip *
Finally, visit the web address to download the file source to your computer like www.webmastersun.com/ webmastersun.zip.

Recover backup file on your VPS

Just like step with zip file, you also need to cd to the folder containing the zip file. Then use the following command:

Code:
unzip webmastersun.zip
If it pops up notifications override file, you can choose Y to agree to override a file or select a file to override whole.

This should do via terminal program like Putty, ZOC Terminal..etc

If you have any questions to ask, don't hesitate to ask me on this thread. I'm ready to support you :D
 
Newer threads
Latest threads
Replies
0
Views
590
Replies
2
Views
789

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top