How often do you run backups on your system?
from Sunny@slrpnk.net to selfhosted@lemmy.world on 17 Feb 20:52
https://slrpnk.net/post/18533403

Basically title. I’m in the process of setting up a proper backup for my configured containers on Unraid and I’m wondering how often I should run my backup script. Right now, I have a cron job set to run on Monday and Friday nights, is this too frequent? Whats your schedule and do you strictly backup your appdata (container configs), or is there other data you include in your backups?

#selfhosted

threaded - newest

scrubbles@poptalk.scrubbles.tech on 17 Feb 20:59 next collapse

Boils down to how much are you willing to lose? Personally I do weekly

darklamer@lemmy.dbzer0.com on 17 Feb 20:59 next collapse

Once every 24 hours.

IsoKiero@sopuli.xyz on 17 Feb 21:23 collapse

Yep. Even if the data I’m backing up doesn’t really change that often. Perhapas I should start to back up files from my laptop and workstation too. Nothing too important is stored only on those devices, but reinstalling and reconfiguring everything back is a bit of a chore.

JASN_DE@lemmy.world on 17 Feb 21:01 next collapse

Nextcloud data daily, same for the docker configs. Less important/rarely changing data once per week. Automatic sync to NAS and online storage. Irregular and manual sync to an external disk.

7 daily backups, 4 weekly backups, “infinite” monthly backups retained (until I clean them up by hand).

nichtburningturtle@feddit.org on 17 Feb 21:03 next collapse

Timeshift creates a btrfs snapshot on each boot for me. And my server gets nightly borg backups.

QuizzaciousOtter@lemm.ee on 17 Feb 21:08 collapse

Just a friendly reminder that BTRFS snapshots are not backups.

tal@lemmy.today on 17 Feb 21:17 next collapse

You’re correct and probably the person you’re responding to is treating one as an alternative as another.

However, theoretically filesystem snapshotting can be used to enable backups, because they permit for an instantaneous, consistent view of a filesystem. I don’t know if there are backup systems that do this with btrfs today, but this would involve taking a snapshot and then having the backup system backing up the snapshot rather than the live view of the filesystem.

Otherwise, stuff like drive images and database files that are being written to while being backed up can just have a corrupted, inconsistent file in the backup.

vividspecter@lemm.ee on 17 Feb 21:21 next collapse

btrbk works that way essentially. Takes read-only snapshots on a schedule, and uses btrfs send/receive to create backups.

There’s also snapraid-btrfs which uses snapshots to help minimise write hole issues with snapraid, by creating parity data from snapshots, rather than the raw filesystem.

tal@lemmy.today on 17 Feb 21:27 collapse

and uses btrfs send/receive to create backups.

I’m not familiar with that, but if it permits for faster identification of modified data since a given time than scanning a filesystem for modified files, which a filesystem could potentially do, that could also be a useful backup enabler, since now your scan-for-changes time doesn’t need to be linear in the number of files in the filesystem. If you don’t do that, your next best bet on Linux – and this way would be filesystem-agnostic – is gonna require something like having a daemon that runs and uses inotify to build some kind of on-disk index of modifications since the last backup, and a backup system that can understand that.

looks at btrfs-send(1) man page

Ah, yeah, it does do that. Well, the man page doesn’t say what time it runs in, but I assume that it’s better than linear in file count on the filesystem.

QuizzaciousOtter@lemm.ee on 18 Feb 05:38 collapse

Absolutely, my backup solution is actually based on BTRFS snapshots. I use btrbk (already mentioned in another reply) to take the snapshots and copy them to another drive. Then a nightly restic job backs up the latest snapshot to B2.

nichtburningturtle@feddit.org on 17 Feb 21:22 collapse

Yes. That’s why I sync my important files to my nextcloud.

QuizzaciousOtter@lemm.ee on 18 Feb 05:40 collapse

That’s good. You can also check out btrbk - it’s a tool which can take snapshots for you, like Timeshift, but also back them up to somewhere.

Darkassassin07@lemmy.ca on 17 Feb 21:13 next collapse

I run Borg nightly, backing up the majority of the data on my boot disk, incl docker volumes and config + a few extra folders.

Each individual archive is around 550gb, but because of the de-duplication and compression it’s only ~800mb of new data each day taking around 3min to complete the backup.

Borgs de-duplication is honestly incredible. I keep 7 daily backups, 3 weekly, 11 monthly, then one for each year beyond that. The 21 historical backups I have right now RAW would be 10.98tb of data. After de-duplication and compression it only takes up 407.98gb on disk.

<img alt="" src="https://lemmy.ca/pictrs/image/24b86a23-6885-4d47-963a-329f73ee0ddb.jpeg">

With that kind of space savings, I see no reason not to keep such frequent backups. Hell, the whole archive takes up less space than one copy of the original data.

Sunny@slrpnk.net on 17 Feb 22:28 next collapse

Thanks for sharing the details on this, very interesting!

FryAndBender@lemmy.world on 18 Feb 17:53 collapse

+1 for borg


                   Original size      Compressed size    Deduplicated size

This archive: 602.47 GB 569.64 GB 15.68 MB All archives: 16.33 TB 15.45 TB 607.71 GB

                   Unique chunks         Total chunks

Chunk index: 2703719 18695670

savvywolf@pawb.social on 17 Feb 21:16 next collapse

Daily backups here. Storage is cheap. Losing data is not.

slazer2au@lemmy.world on 17 Feb 21:22 next collapse

Backups???

metaStatic@kbin.earth on 17 Feb 21:29 collapse

Raid is a backup.

slazer2au@lemmy.world on 17 Feb 21:41 next collapse

That is what the B in RAID stands for.

atzanteol@sh.itjust.works on 17 Feb 22:05 next collapse

🤣

avidamoeba@lemmy.ca on 17 Feb 22:48 next collapse

What’s the second B stand for?

meyotch@slrpnk.net on 18 Feb 00:00 collapse

Beets.

Or bears.

Or buttsex.

It’s context dependent, like “cool”.

metaStatic@kbin.earth on 18 Feb 00:09 collapse

cool

AtariDump@lemmy.world on 18 Feb 04:53 collapse

Just like the “s” in IoT stands for “security”

avidamoeba@lemmy.ca on 18 Feb 00:03 collapse

<img alt="" src="https://lemmy.ca/pictrs/image/19f70539-61e4-4ca0-a13f-246e52ecfe2a.png">

If Raid is backup, then Unraid is?

Jozav@lemmy.world on 17 Feb 21:26 next collapse

Using Kopia, backups are made multiple times per day to Google drive. Only changes are transferred.

Configurations are backed up once per week and manually, stored 4 weeks. Websites and NextCloud data is backed up every hour and stored for a year (although I’m doing this only 7 months now).

Kopia is magic, recommended!

metaStatic@kbin.earth on 17 Feb 21:34 next collapse

Thanks for reminding me to validate.

Daily here also.

Dagamant@lemmy.world on 17 Feb 21:36 next collapse

Weekly full backup, nightly incremental

hendrik@palaver.p3x.de on 17 Feb 21:39 next collapse

Most backup software allow you to configure backup retention. I think I went with some pretty standard once per day for a week. After that they get deleted, and it keeps just one per week of the older ones, for one or two months. And after that it's down to monthly snapshots. I think that aligns well with what I need. Sometimes I find out something broke the day before yesterday. But I don't think I ever needed a backup from exactly the 12th of December or something like that. So I'm fine if they get more sparse after some time. And I don't need full backups more than necessary. An incremental backup will do unless there's some technical reason to do full ones.

But it entirely depends on the use-case. Maybe for a server or stuff you work on, you don't want to lose more than a day. While it can be perfectly alright to back up a laptop once a week. Especially if you save your documents in the cloud anyway. Or you're busy during the week and just mess with your server configuration on weekends. In that case you might be alright with taking a snapshot on fridays. Idk.

(And there are incremental backups, full backups, filesystem snapshots. On a desktop you could just use something like time machine... You can do different filesystems at different intervals...)

ocean@lemmy.selfhostcat.com on 17 Feb 21:48 next collapse

Depends on the system but weekly at least

atzanteol@sh.itjust.works on 17 Feb 22:03 next collapse

I have a cron job set to run on Monday and Friday nights, is this too frequent?

Only you can answer that - what is your risk tolerance for data loss?

30p87@feddit.org on 17 Feb 22:15 next collapse

Every hour, automatically

Never on my Laptop, because I’m too lazy to create a mechanism that detects when it’s possible.

thejml@lemm.ee on 17 Feb 22:29 collapse

I just tell it to back up my laptops every hour anyway. If it’s not on, it just doesn’t happen, but it’s generally on enough to capture what I need.

AMillionMonkeys@lemmy.world on 17 Feb 22:31 next collapse

I tried Kopia but it was unstable and janky, so now it’s whenever I remember to manually run a bunch of rsync. I backup my desktop to cold storage on the first of the month, so I should get in the habit of backing up my server to the NAS then also.

papertowels@mander.xyz on 17 Feb 23:00 next collapse

And equally important, how do you do your backups? What system and to where?

avidamoeba@lemmy.ca on 17 Feb 23:01 next collapse

Every hour. Could do it more frequently if needed.

It depends on how resource intensive the backup process is.

Consider an 800GB Immich instance.

Using Duplicity or rsync takes 1 hour per backup. 99% of the time is spent in traversing the directory structure and checking which files have changed. 1% is spent into transferring the difference to the backup. Any backup system that operates on top of the file system would take this much. In addition, unless you’re using something that can take snapshots of the filesystem, you have to stop Immich during the backup process in order to prevent backing up an invalid app state.

Using ZFS send on the other hand (with syncoid) takes less than 5 seconds to discover the differences and the rest of the time is spent on the data transfer, at 100MB/s in my case. Since ZFS send is based on snapshots, I don’t have to stop the service either.

When I used Duplicity to backup, I would backup once week because the backup process was long and heavy on the disk array. Since I switched to ZFS send, I do it once an hour because there’s almost no visible impact.

I’m now in the process of migrating my laptop to ZFS on root in order to be able to utilize ZFS send for regular full system backups. If successful, eventually I’ll move all my machines to ZFS on root.

Lem453@lemmy.ca on 17 Feb 23:01 next collapse

Local zfs snap every 5 mins.

Borg backups everything hour to 3 different locations.

I’ve blown away docker folders of config files a few times by accident. So far I’ve only had to dip into the zfs snaps to bring them back.

avidamoeba@lemmy.ca on 17 Feb 23:08 collapse

Try ZFS send if you have ZFS on the other side. It’s insane. No file IO, just snap and time for the network transfer of the delta.

Lem453@lemmy.ca on 18 Feb 02:05 collapse

I would but the other side isn’t zfs so I went with borg instead

truxnell@infosec.pub on 17 Feb 23:03 next collapse

Daily backups. Currently using restic on my NixOS servers. To avoid data corruption, I make a zfs snapshot at 2am, and after that restic does a backup of my mutable data dirs both to my local Nas and CloudFlare r3. The Nas backup folder is synced to backblaze nightly as well for a more cold store.

deadcatbounce@reddthat.com on 17 Feb 23:28 next collapse

If you haven’t tested your backups, you ain’t got a backup.

infinitevalence@discuss.online on 18 Feb 00:03 next collapse

Depends on the application. I run a nightly backup of a few VM’s because realistically they dont change much. I have containers on the other hand that run critical (to me) systems like my photo backup and they are backed up twice a day.

Ganbat@lemmy.dbzer0.com on 18 Feb 02:03 next collapse

I do not as I cannot afford the extra storage required to do so.

HeyJoe@lemmy.world on 18 Feb 02:40 next collapse

I honestly don’t have too much to back up, so I run one full backup job every Sunday for different directories I care about. They run a check on the directory and only back up any changes or new files. I don’t have the space to backup everything, so I only take the smaller stuff and most important. The backup software also allows live monitoring if I enable it, so some of my jobs I have that turned on since I didn’t see any reason not to. I reuse the NAS drives that report errors that I replace with new ones to save on money. So far, so good.

Backup software is Bvckup2, and reddit was a huge fan of it years ago, so I gave it a try. It was super cheap for a lifetime license at the time, and it’s super lightweight. Sorry, there is no Linux version.

MangoPenguin@lemmy.blahaj.zone on 18 Feb 04:17 next collapse

Longest interval is every 24 hours. With some more frequent like every 6 hours or so, like the ones for my game servers.

I have multiple backups (3-2-1 rule), 1 is just important stuff as a file backup, the other is a full bootable system image of everything.

With proper backup software incremental backups don’t use any more space unless files are changed, so no real downside to more frequent backups.

notfromhere@lemmy.ml on 18 Feb 04:45 next collapse

Not as o̸̯̪̳̫͗f̴̨͇̉̉̀ͅt̶̢̩̞̽̾̆ẽ̶̳n̸̩͓̯̼͑̃̀̉ ̶̛̜̘̠̉̍̕a̸̭͆̓̀s̴̙͚̮̣̊ ̷̮̽̀Ị̷̬͓̀̕ ̸̧̨̜̥̄͠ş̸̨̫̼͔̠̘͕̮̫̥̘̜͉͖̦̱̭͕̟͕̳̩͎̅̍̿̓̆̈̍̏͛͛̋̈́̇̅̑̓̀̊͗͘͝͝͝͠h̸̢̡̢̢̖͖̝̦̰̤̦͉̒̀̋̾̉̈́̏́̉ơ̶̢̲̤̩͈̹͙̯̝͕͕͔̱̌̀͛̑͑̏̓̔͐͋̆ŭ̶̧̢͙͉̭̮̺͚͍͙̮̫̩̮͓͉͗͗̃̏͊̀̽̂̏͊̎̐̓̌̕͝͠l̸̖̙̩̖̈͗́̀̓̀͗̏͑̊̃̓͋͛̕͠͝d̷̳̼̆́͛̀̆̽́͑̏͂͌͘

3aqn5k6ryk@lemmy.world on 18 Feb 04:45 next collapse

No backup for my media. Only redundacy.

For my nextcloud data, anytime i made major changes.

AnExerciseInFalling@programming.dev on 18 Feb 05:07 next collapse

I use Duplicati for my backups, and have backup retention set up like this:

Save one backup each day for the past week, then save one each week for the past month, then save one each month for the past year.

That way I have granual backups for anything recent, and the further back in the past you go the less frequent the backups are to save space

Xanza@lemm.ee on 18 Feb 05:35 next collapse

I continuous backup important files/configurations to my NAS. That’s about it.

IMO people who redundant/backup their media are insane… It’s such an incredible waste of space. Having a robust media library is nice, but there’s no reason you can’t just start over if you have data corruption or something. I have TB and TB of media that I can redownload in a weekend if something happens (if I even want). No reason to waste backup space, IMO.

groet@feddit.org on 18 Feb 07:14 next collapse

It becomes a whole different thing when you yourself are a creator of any kind. Sure you can retorrent TBs of movies. But you can’t retake that video from 3 years ago. I have about 2 TB of photos I took. I classify that as media.

Xanza@lemm.ee on 18 Feb 18:24 collapse

It becomes a whole different thing when you yourself are a creator of any kind.

Clearly this isn’t the type of media I was referencing…

Appoxo@lemmy.dbzer0.com on 18 Feb 12:21 collapse

Maybe for common stuff but some dont want 720p YTS or yify releases.
There are also some releases that don’t follow TVDB aired releases (which sonarr requires) and matching 500 episodes manually with deviating names isn’t exactly what I call ‘fun time’.
Amd there are also rare releases that just arent seeded anymore in that specific quality or present on usenet.

So yes: Backup up some media files may be important.

Xanza@lemm.ee on 18 Feb 18:22 collapse

Data hoarding random bullshit will never make sense to me. You’re literally paying to keep media you didn’t pay for because you need the 4k version of Guardians of the Galaxy 3 even though it was a shit movie…

Grab the YIFY, if it’s good, then get the 2160p version… No reason to datahoard like that. It’s frankly just stupid considering you’re paying to store this media.

Appoxo@lemmy.dbzer0.com on 18 Feb 18:34 collapse

This may work for you and please continue doing that.

But I’ll get the 1080p with a moderate bitrate version of whatever I can aquire because I want it in the first place and not grab whatever I can to fill up my disk.

And as I mentioned: Matching 500 episodes (e.g. Looney Tunes and Disney shorts) manually isnt fun.
Much less if you also want to get the exact release (for example music) of a certain media and need to play detective on musicbrainz.

Xanza@lemm.ee on 18 Feb 22:48 collapse

Matching 500 episodes (e.g. Looney Tunes and Disney shorts) manually isnt fun.

With tools like TinyMediaManager, why in the absolute fuck would you do it manually?

At this point, it sounds like you’re just bad at media management more than anything. 1080p h265 video is at most between 1.5-2GB per video. That means with even a modest network connection speed (500Mbps lets say) you can realistically download 5TB of data over 24 hours… You can redownload your entire media library in less than 4-5 days if you wanted to.

So why spend ~$700 on 2 20TB drives, one to be used only as redundancy, when you can simply redownload everything you previously had (if you wanted to) for free? It’ll just take a little bit of time.

Complete waste of money.

Appoxo@lemmy.dbzer0.com on 19 Feb 06:23 collapse

I prefer Sonarr for management.
Problem is the auto matching.
It just doesnt always work.
Practical example: Looney. Tunes.and.Merrie.Melodies.HQ.Project.v2022

Some episodes are either not in the correct order or their name is deviating from how tvdb sorts it.
Your best regex/automatching can do nothing about it if Looney.Tunes.Shorts.S11.E59.The.Hare.In.Trouble.mkv should actually be named Looney.Tunes.Shorts.S1959.E11.The.Hare.In.A.Pickle.mkv to be automatically imported.

At some point fixing multiple hits becomes so tedious it’s easier to just clear all auto-matches and restart fresh.

mosjek@lemmy.world on 18 Feb 05:55 next collapse

I classify the data according to its importance (gold, silver, bronze, ephemeral). The regularity of the zfs snapshots (15 minutes to several hours) and their retention time (days to years) on the server depends on this. I then send the more important data that I cannot restore or can only restore with great effort (gold and silver) to another server once a day. For bronze, the zfs snapshots and a few days of storage time on the server are enough for me, as it is usually data that I can restore (build artifacts or similar) or is simply not that important. Ephemeral is for unimportant data such as caches or pipelines.

Shimitar@downonthestreet.eu on 18 Feb 06:15 next collapse

Daily toward all my three locations:

  • local on the server
  • in-house but on a different device
  • offsite

But not all three destinations backup the same amount of data due to storage limitations.

ikidd@lemmy.world on 18 Feb 06:35 next collapse

Proxmox servers are mirrored zpools, not that RAID is a backup. Replication between Proxmox servers every 15 minutes for HA guests, hourly for less critical guests. Full backups with PBS at 5AM and 7PM, 2 sets apiece with one set that goes off site and is rotated weekly. Differential replication every day to zfs.rent. I keep 30 dailies, 12 weeklys, 24 monthly and infinite annuals.

Periodic test restores of all backups at various granularities at least monthly or whenever I’m bored or fuck something up.

Yes, former sysadmin.

scarecrow365@reddthat.com on 20 Feb 05:06 collapse

This is very similar to how I run mine, except that I use Ceph instead of ZFS. Nightly backups of the CephFS data with Duplicati, followed by staggered nightly backups for all VMs and containers to a PBS VM on a the NAS. File backups from unraid get sent up to CrashPlan.

Slightly fewer retention points to cut down on overall storage, and a similar test pattern.

Yes, current sysadmin.

ikidd@lemmy.world on 20 Feb 06:07 collapse

I would like to play with ceph but I don’t have a lot of spare equipment anymore, and I understand ZFS pretty well, and trust it. Maybe the next cluster upgrade if I ever do another one.

And I have an almost unhealthy paranoia after see so many shitshows in my career, so having a pile of copies just helps me sleep at night. The day I have to delve into the last layer is the day I build another layer, but that hasn’t happened recently. PBS dedup is pretty damn good so it’s not much extra to keep a lot of copies.

zero_gravitas@aussie.zone on 18 Feb 08:26 next collapse

Right now, I have a cron job set to run on Monday and Friday nights, is this too frequent?

Only you can answer this. How many days of data are you prepared to lose? What are the downsides of running your backup scripts more frequently?

[deleted] on 18 Feb 10:45 next collapse

.

Slax@sh.itjust.works on 18 Feb 11:28 next collapse

I have

  • Unraid back up it’s USB
  • Unraid appears gets backed up weekly by a community applications (CA app backup) and I use rclone to back it up to an old box account (100GB for life…) I did have it encrypted but seems I need to fix that…
  • Parity drive on my Unraid (8TB)
  • I am trying to understand how to use Rclone to back up my photos to Proton Drive so that’s next.

Music and media is not too important yet but I would love some insight

Appoxo@lemmy.dbzer0.com on 18 Feb 12:15 next collapse

Assuming it is on: Daily

Solaer@lemmy.world on 18 Feb 12:36 next collapse

Backup all of my proxmox-LXCs/VMs to a proxmox backup server every night + sync these backups to another pbs in another town. A second proxmox backup every noon to my nas. (i know, 3-2-1 rule is not reached…)

desentizised@lemm.ee on 18 Feb 15:57 next collapse

rsync from ZFS to an off-site unraid every 24 hours 5 times a week. on the sixth day it does a checksum based rsync which obviously means more stress so only do it once a week. the seventh day is reserved for ZFS scrubbing every two weeks.

madame_gaymes@programming.dev on 19 Feb 23:53 collapse

I’m always backing up with SyncThing in realtime, but every week I do an off-site type of tarball backup that isn’t within the SyncThing setup.