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:
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