Anope.org > General Chat

Create backup services

(1/1)

CrazyCat:
Hi there,

I had troubles with my main server which hostes my services, so I'm trying to find a good way to have a backup that I can quickly turn on.
Normal services are on server HostA, backup services will be on HostB. HostB also have a mysql where the normal services store datas.

What I think to do:
- in ircds, add link and uline for backup services
- regularly copy anopes data from main to backup (rsync every hour ?)
- in case of crash of the main server, just start the backup services
this method has two problems imho:
1. rsync can run when services write in DB, which may corrupt the backup db
2. I can loose data between last copy and new run

Another way I think about is to use the MySQL and m_sql_live on the backup, the main server using just m_sql. Probably better but I'm not sure (I'll make tests soon) that m_sql_live will fill the flat file db.

Any idea ?

Lord255:
hello.
not so sure how to do, but i think the way here would be to replicate the db files between the two servers. i mean.. db replication. not sync the db files themselves, but with something, the data itself. lots of solutions should be otu there, though maybe not for the free versions. :(
other option could be to sync the anope db files and have it there and till services back to normal on hostA, just disable the reg and changes? (lockdown?) so already registered users can use services for id and auotops and such but rest just cannot register?
idk if lockdown is the solution or a possibility for that, but i would think about such feature. :)

CrazyCat:
Some points I forget:
- the backup services will be started by the hand, I won't automate that,
- the normal services, after a crash, will also be started by the hand, so I'll do a manual restore from the backup

The purpose is to have the less out of service delay in case of big server crash, and the less lost of datas. If this crash(*) occures, I must manage it by myself.

(*) crash could also be a big maintenance operation, or whatever will make the HostA unreachable

Lord255:
ah i see. :) well, if you dont wanna' automate it, it's pretty simple. make sure though you have a backup / dump on hostB, have services prepared (installed, configured) (also mysql in case; but iam pretty sure that the flatfile solution is more simple here) and yeah, as you said, you just start it whenever its needed. the switchback could work like the same. stom on B, move the file to A, start - in this way you wouldnt loose any data which was "set" on B side.

the main question is: how you handle your data right now, i mean is it flatfile or in mysql. mysql version needs more steps to do.

Navigation

[0] Message Index

Go to full version