Comment on Moving db data (MariaDB) to NFS NAS Hello self-hosters! :) I’d like to tap in
INeedMana@piefed.zip 2 weeks ago replication in the database it self
AFAIK db replication would require running another db on NAS. Which I tried to avoid
I have another cronjob that takes a backup into the first database docker init folder. Older backups end with -date so they won’t get picked up by the init script. You can do similar with just docker.
Yeah, that’s why I’m thinking to do. Have a container that watches changes to db data and rsyncs those into the NAS for safekeeping. My main goal in all of this is so db data won’t die with laptop’s SSD
I think the inode rsync is a bad idea. The 2nd DB would be on the NAS but its not being used by the app, so as long as it’s asynchronous writes, you should be okay.
In either case, I hope you have backups, not just the copy
But then I have to maintain it too. And it will be using RAM that was supposed to only be for servicing RAID. On a platform where RAM can’t grow
For sure my setup will be growing and changing with time. But ATM this “prod” db lives only on laptop’s SSD
Personally, it sounds like you’re overengineering your setup. If it’s to learn then have fun! However, if its ‘prod’ and you care about the data then you should stick to prod tested architecture. You won’t find many people (if any at all) using inode notify to rsync a database on change.
Might be! It’s just that having a container like that feels easier than looking after bare-metal secondary db
Maybe I’ll just
pg_dumpduring Nextcloud maintenance window and get into BorgBackup putting the dumps on NAS? If I have to revive the db from the dead, I’ll probably just use the dump anyway, so that’s one hoop less