Home > WebDeveloperBoston > How to make backup on your VPS by ssh?

How to make backup on your VPS by ssh?

0
Vote

=== MySql ===

ssh command line: mysqldump -A –user=mysqlLogin –password=mysqlPass > mysql_2009_06_14.sql;
it makes dump all tables of your Date base.

ssh command line: tar -czf mysql_2009_06_14.tar.gz mysql_2009_06_14.sql;
it makes gzip archive of your dump

ssh command line: rm -f mysql_2009_06_14.sql;
This will delete the temporary file with dump

=== files ===
Go to directory with your web sites. (if you have Plesk then it will be var/www/)

ssh command line: tar -czf vps_2009_06_14.tar.gz vhosts
tar -czf [file name with your gzip backup] [directory with your web sites or * - all directory]

Categories: WebDeveloperBoston Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.
 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up