Syncing two nextcloud installations

I want to run Nextcloud in docker and also as a backup in an LXD/Incus instance. The purpose of this setup is that in the event something goes wrong with the Docker installation i have the database and configuration and files backed up onto a the LXD/Incus instance that will serve as a hot backup that I can quickly swap in and continue working.

The installation would include collabora, postresql database for both. Is this feasible/doable? would this all be done via rsync or is there another best solution?

@wedyje1992 welcome to the Nextcloud community :waving_hand:

while this is a Nextcloud forum and not an LXD/LXC forum you should take a closer look at Proxmox, Incus or LXD to learn about managing clusters.

you could have a look here at a similar simple LXD setup with two nodes for scripted cold-standby with manual (WOL) fail over. especially this syncronise/copy containers between LXD nodes but its certainly not a Nextcloud topic

1 Like

What if the question is syncing nextcloud between two docker instances or servers?

the topic of high-availability is pretty complex. As long you don’t really really really need it you should avoid clusters, hot/cold whatever stand-by systems because of additional complexity.

At the end the question is pretty simple - if the disaster really happens and your system is completely lost (you can continue with smaller issues, but lets discuss black/white for the sake of simplicity) how long you can afford the system remains down? in most cases you think about days and maybe even weeks.. and once you know the time you need to bring back the system online (the term is RTO) you design the process to meet this time. in most cases you should opt for backups, frequent, distributed backups and only if your RTO is measured in minutes it’s worth to think about cluster and similar technology. The problem with it you pay the time to reduce the RTO in advance - to properly implement a stand-by system you must frequently verify the system is functional and you are prepared for failover - to ensure this you must train the procedure often. so you spend hardware, maintenance and testing all the time in advance for potentially reduced RTO.

From my personal opinion you should focus on good and bullet-proof backup strategy - see 101: backup what and why (not how) - once you have it in place and ensure you can recover from the biggest issue - if required you can incrementally speed up recovery using faster storage, faster network and more/better hardware.

Look at the tag high-availability we had few discussions already, likely there is something useful.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.