Loomio

Move postgresql database to separate machine

I Sagar PublicSeen by 343

In current setup , we're running multiple web services like Matrix,diaspora,poddery on a single machine. Due to limited resources of the machine , we had a frequent downtime of services . To solve this problem, its better have the separate machine for postgresql database on the Same openstack instance. Let me know what others think .

Pirate Praveen

looks good to me. Just make sure we have proper working backups before starting the migration.

Shamil

👍 And we should do it quickly too.

Pirate Praveen

@isaagar make a plan, list out the steps, then schedule a down time. We should announce it to our users. We can review the steps.

I Sagar

@praveenarimbrathod @noteness Yes, amar already provided one machine with 40 GB disk space.

I Sagar

Yes, i thought of that and interesting to see how slave becomes master :)

I Sagar

New machine has public IP which I'll share and add the others ssh keys
Following are the steps for setup.
1. Find the configuration of all web services dependent on the postgresql where we need to change it according to our new setup. (Adding it in the wiki will be helpful before starting the setup)
2. Encrypt the 40 GB disk of the new machine.
3. Setup the postgrsql on new machine (replica ? new version 9.6?).
4. Shutdown all services and Sync the database to the new machine. (~12G and will be faster locally)
5. Make changes in the configuration of services and start the services.

Shamil

Shutdown all services and Sync the database to the new machine. (~12G and will be faster locally)

Do we need to shutdown all the services while replicating? Can't we just use pg_basebackup?

I Sagar

Not needed while replicating but we haven't decided with the approach. Whether it is replica setup or just manual moving of database to the new machine.And, to keep the new instance in sync with existing we have stop services from committing in the database before syncing to the new machine.

I Sagar

@praveenarimbrathod @noteness @devraj Lets finalize the steps.

Raju Devidas

How much time will we need to complete the migration? We can announce the downtime (if any )accordingly.

I Sagar

IMO , at the max 1 Hour . Lets do the steps 1 to 3 today.

Raju Devidas

what should we tell in the public announcement?

I Sagar

Server side maintenance work.

Pirate Praveen

I think we can try to save some resources by shutting down services that are not used much like xmpp bridge, and possibly prosody and chat.diasp.in

Can we shutdown xmpp bridge?

opt-in by Pirate Praveen Closed Thu 28 Dec 2017 1:34PM

we are hitting the limits and I think this could be easily

Results

Pirate Praveen
Yes

yes, it is run for just one channel (#piratesin:diasp.in)

Anish Sheela
Yes

Why? more details please.

Anish Sheela
Yes

I trust praveen's decision on this

Raju Devidas
Yes

go ahead. We should give a blog post or something like that on closing of the service. Also asking people to migrate to other services like disroot.org or riseup.net etc.

Raju Devidas

Is #piratesin:diasp.in active? Everyone is on the matrix side, right?

Pirate Praveen

yes, I don't see anyone joining via xmpp side. I think Arjun used to join, but he quit.