bikesh
bikesh

Reputation: 31

backing up entire linux server on external hard drive or another cluster

We have a linux server for the database. Most of our data are on /var/. I would like to backup entire directory on external hard drive or on another linux system so that if something goes wrong I can entirely replace the directory. Since the directory has many files, I do not want to copy and paste every time instead I like to sync them.

Is there easy way to do that? rsyn can do that, how do I avoid of login every time the server? BTW I have limited knowledge of linux system.

Appreciated any comments and suggestions.

Bikesh

Upvotes: 0

Views: 788

Answers (1)

LogicIO
LogicIO

Reputation: 623

Rsyncing database files is not a recommended way of backing them up. I believe you have mysql running on the server. In that case, you can take a full database dump in the server, using steps mentioned in following link:

http://www.microhowto.info/howto/dump_a_complete_mysql_database_as_sql.html#idp134080

And, then syncing these files to your backup server. You can use rsych command for this purpose:

http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/

Make sure that you have installed mysql in the backup server too. You can also copy the mysql configuration file /etc/my.cnf file to the database backup server. In case you require your database to be updated always, you can setup mysql replication. You can follow the below mentioned guide to do the same.

http://kbforlinux.blogspot.in/2011/09/setup-mysql-master-slave-replication.html

Upvotes: 1

Related Questions