Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Create backup services  (Read 683 times)

0 Members and 1 Guest are viewing this topic.

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 214
    • French Eggdrop community
Create backup services
« on: August 10, 2021, 12:13:53 PM »

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

  • Anope User
  • Offline Offline
  • Posts: 102
Re: Create backup services
« Reply #1 on: August 10, 2021, 03:48:42 PM »

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. :)
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 214
    • French Eggdrop community
Re: Create backup services
« Reply #2 on: August 11, 2021, 10:00:39 AM »

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

  • Anope User
  • Offline Offline
  • Posts: 102
Re: Create backup services
« Reply #3 on: August 11, 2021, 04:10:21 PM »

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.
Logged
Pages: [1]   Go Up