Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a good idea.
Seeking suggestions from forum members:
Any Linux Server contains 3 main component:
(a) OS specific files: OS files, Networking files etc
(b) user created files like /var/www/html, application files, config files, crontab etc
(c) Database (mysql in my case)
Backup plan:
(c) For database backup use Mysql Hotcopy twice a day.
(b) For user files use rsync twice a day for specific folders which update regularly like /var/www/html, /etc/squid, /etc/asterisk etc
(a) Since OS files seldom change, I can use a monthly g4L hdd replication.
This will also cover any files which have been changed and forgotten to be rsynced.
This way both the servers can be on at all times.
In case of failure, switchover is very simple and easy.
Only loss will be of data after the last rsync+Hotcopy and before the crash.
Awaiting member's feedback and sugestions.
Thx
Vai
PS: The only downside is while doing a g4L, both servers have to be taken down, remove HDD from backup server, install it in main server and run a g4l which takes 2 hours for me for a 160 GB hdd. If there is any tool which can do HDD mirroring between 2 PCs withuot opening, then it will be great. It will save opening up servers, removing HDDs etc for a g4l.
Jeez, this thread took off in my absence! Anyway, if you are not replicating databases, what you do when setting up rsync is you specify the files and directories that you do want backed up, rather than those you don't.
For replicating complete snapshots, perhaps you should consider Logical Volume Management or LVM: http://www.cyberciti.biz/tips/consis...snapshots.html is an idea of how this is done. I suggest testing testing testing if you are gonna use this method, but when it's working it's fantastic. An LVM snapshot can be taken at any stage, even as the system is live. The snapshot can be restored on another server, and if the main server goes down, the backup can be started almost immediately.
Yeah you are right. Basically I don't know why would anyone back up the whole machine if it is just a backup.
The rsync can manage any directory(s) or files.
So he needs to make a clone spare machine then setup the rsync to sync data between the machines. (Eg.: /data1, /data2 dirs)
Yeah, I think this may be overkill, stemming from an education in virtualisation and migration of machines! It's all the rage these days, but I think it's a bit mad!
Quote:
So he needs to make a clone spare machine then setup the rsync to sync data between the machines. (Eg.: /data1, /data2 dirs)
This is exactly what the OP should do. There really is no need for the 'g4l' thing, since if you backup a corrupted system, you've got nowhere to go! Again I say to the OP, rsync is more than enough, along with mysql backups daily.
The key to getting this to work is practice. Do not find yourself in this situation having not tried out these methods! Testing testing testing, I say it again, it will pay off dividends the day your boss has you under pressure to get a machine back up and running.
The only reason to do a G4L once a month (or may be once in 3 months) is to accommodate OS level changes like an rpm install or soemthing of that nature. Ideally the OS level changes should be duplicated on the backup server too!!
OP = Original Poster. Personally, I think that g4l is too much, you're giving yourself work. You would be better off spending the time configuring rsync correctly, and learning how to use it. It is a very powerful tool. I agree that you may find g4l convenient.
When I want to clone a machine, I don't pull the HDD, I just use partimage, a tool included in the systemrescuecd. It still involves halting the machine. However, it works well. I partimage the partition onto an NFS server, and clone it down onto a prepared machine. Works a charm, every time.
When I want to clone a machine, I don't pull the HDD, I just use partimage, a tool included in the systemrescuecd. It still involves halting the machine. However, it works well. I partimage the partition onto an NFS server, and clone it down onto a prepared machine. Works a charm, every time.
Actually, G4L can do the cloning that way too. I can create an image and store it on a different device and then restore it on the backup server. I have never tried it, but will do it over the weekend.
So I have decided....
RSync for daily backups and should the need arise and for safety sake, I will copy the disk image once every 3 months.
Thx a lot members for your help and imputs.
Really appreciate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.