this post was submitted on 07 Apr 2024
7 points (88.9% liked)
Aotearoa / New Zealand
1658 readers
5 users here now
Kia ora and welcome to !newzealand, a place to share and discuss anything about Aotearoa in general
- For politics , please use !politics@lemmy.nz
- Shitposts, circlejerks, memes, and non-NZ topics belong in !offtopic@lemmy.nz
- If you need help using Lemmy.nz, go to !support@lemmy.nz
- NZ regional and special interest communities
Rules:
FAQ ~ NZ Community List ~ Join Matrix chatroom
Banner image by Bernard Spragg
Got an idea for next month's banner?
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I finally got around to setting up backups on my home server. Got borgmatic saving to a raspberry pi I have at my parents house with a big USB HDD attached. Took me weeks of chipping away at it trying to get my head its yaml config, cron jobs and SSH keys but feels good once its all working!
Nice job! What kind of stuff are you hosting on the server?
Its an Ubuntu server with a bunch of stuff in docker containers. The main thing I wanted to backup is my next cloud data which stated as just a hobby but now has the whole family using, and a Lot of audio books all hosted through audiobookshelf.
Ah yes, nextcloud would be important to back up. Audiobooks you can probably re-aquire but if people are storing personal stuff on Nextcloud you will want to make sure it's backed up. A common strategy is the 3 2 1 backup strategy. Have three copies of your data, two on different media, and one offsite.
It sounds like you have your original copy and your offsite copy now set up. I'd recommend having an extra backup, a backup of the nextcloud data on a different hard drive on the same machine (or another machine - but this copy should be on a different hard drive to the original copy). Personally I don't do anything fancy, I just run a cron job to bring down nextcloud (so nothing changes), and to run a script to zip up the nextcloud data (I use bind mounts for volumes so everything sites nicely in a nextcloud folder, including docker-compose.yml file, database, and nextcloud data), then I copy that zipped file to my backup drive with the date in the file name so I have multiple copies. I run this each night scheduled in the middle of the night, then have another script that trims the backups to keep 14 days of backups then a monthly backup indefinitely (always first of the month, for simplicity).
That sounds like a lot of disk space.... My next cloud is approaching 1tb so having 14 copy's is not going to fit... But yes I need to sort out a third copy some how. Audio books have all been riped from family members audiable accounts, so I want to keep them safe. I can see Amazon patching the service to prevent this one day.
My nextcloud is not 1TB, as interestingly I don't really use if for files but far more so for the nextcloud apps and as a sync server for various other things.
The 14 copies probably are not needed. I do this because I have space for it (I think nextcloud backups are about 2GB each for me). In your case aiming for three is probably fine, certainly better than two. I'd likely only keep the three copies if mine were that large. You could also investigate backup options that only backup changes and not every file every day.
My main concern is if I accidentally deleted a bunch of files, then that deletion got synced to the other copies. That's why I zip up daily copies and keep them for a couple of weeks, just extra protection. Finding a good incremental backup tool (that let you roll back changes) would probably provide the same protection anyway, I haven't looked into this myself though.