How can I backup a directory or my website via SSH?

To backup complete site files, login via SSH.

While you are in the main dir type:

tar -zcf site_backup.tar.gz public_html

This will create a file named site_backup.tar.gz in your main dir. 

To restore this file as a site type:

gunzip site_backup.tar.gz

Hit enter, then type:

tar -xvf site_backup.tar

Hit enter and your all done. 

If you need to archive your emails stored in your account, you can do the same with "mail" folder. This does not include MySQL database backup if you use databases. Please refer to the MySQL section on how to do the backup.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I get SSH access enabled?

If SSH access is not enabled, please open a support ticket and we will activate it for you.

What are some basic Linux shell commands?

filename.txt Same as ls �alR, outputs the results to a filels *.html Lists all files ending with...

How do I change file permissions via SSH?

Using the CHMOD command:The letters u (for user), g (for group), and o (for other) are used with...

What is Telnet/SSH and do you allow it?

For security purposes, we do not enable Telnet at all and we only enable SSH access by request....

What is SCP / SFTP?

SCP and SFTP are both part of OpenSSH, the secure shell server we run. Do note that you cannot...