this post was submitted on 10 Jan 2024
55 points (96.6% liked)

Selfhosted

40226 readers
1047 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I was wondering how often does one choose to make and keep back ups. I know that “It depends on your business needs”, but that is rather vague and unsatisfying, so I was hoping to hear some heuristics from the community. Like say I had a workstation/desktop that is acting as a server at a shop (taking inventory / sales receipts) and would be using something like timeshift to keep snapshots. I feel like keeping two daily and a weekly would be alright for a store, since the two most recent would not be too old or something. I also feel like using the hourly snapshots would be too taxing on a CPU and might be using to much disk space.

all 36 comments
sorted by: hot top controversial new old
[–] henfredemars@infosec.pub 20 points 10 months ago (3 children)

I still have drawings I made in MS Paint on Windows 95 when it had just come out, my first text document, and the first report I ever typed in grade school.

Btrfs snapshots of the root volume in RAID1 configuration with 8 hourly, 7 daily, 3 weekly, and automated rsync backups to NAS, with primary and secondary offsite, physically disconnected backups stored in sealed, airtight, and waterproof containers at two different banks prepaid storage and with advanced directive in the event of my demise.

Bit of a hobby really. I acknowledge it's completely unnecessary. I don't like to lose data.

[–] Dave@lemmy.nz 10 points 10 months ago (1 children)

Sealed, airtight, and waterproof but what if both banks burn down at the same time? You didn't mention fire-proof.

[–] henfredemars@infosec.pub 5 points 10 months ago

You got me there! Not fireproof. In that case I'm just hoping that having two off-site backups at different locations has me covered, but that's a good idea. I should consider fireproof foil.

[–] Appoxo@lemmy.dbzer0.com 8 points 10 months ago (1 children)

You are backed up better than some enterprises...

Just wow.

[–] henfredemars@infosec.pub 4 points 10 months ago

Another perspective is data hoarding.

I have system images of machines of relatives who have died. Many of the photos that I have retained are the only ones. However, that was more an emergent utility than a motivating one.

[–] bitwaba@lemmy.world 2 points 10 months ago (1 children)

How often do you update your off-site backups?

[–] henfredemars@infosec.pub 3 points 10 months ago

Monthly, alternating locations.

[–] Dehydrated@lemmy.world 19 points 10 months ago (1 children)
[–] werefreeatlast@lemmy.world 5 points 10 months ago

I back up every morning to get to work and every afternoon to get back home lol

[–] sep@lemmy.world 11 points 10 months ago

How often depends on how much work it is to recreate, or the consequences of loosing data.

Some systems do not have real data locally, get a backup every week. Most get a nightly backup. Some with a high rate of change , get a lunch/middle of the workday run.
Some have hourly backups/snapshots, where recreating data is impossible. CriticL databases have hourly + transaction log streaming offsite.

How long to keep a history depends on how likely an error can go unnoticed but minimum 14 days. Most have 10 dailes + 5 weeky + 6 monthly + 1 yearly.

If you have paper recipes and can recreate data lost easily. Daily seems fine.

[–] Appoxo@lemmy.dbzer0.com 5 points 10 months ago (1 children)

My PC: Every day and when it is online
My drives the backups go to: Once a week.

[–] 69420@lemmy.world 1 points 10 months ago (1 children)

Wait, so you backup your backups? Why not just 2 backups of the same thing?

[–] Appoxo@lemmy.dbzer0.com 2 points 10 months ago

Limitation of hardware.
It is essentially just a file copy.

[–] dr_robot@kbin.social 4 points 10 months ago* (last edited 10 months ago) (1 children)

As others have said, with an incremental filesystem level mechanism, the backup process won't be too taxing for the CPU. I have ZFS set up which makes this easy and I make hourly snapshots using sanoid which also get sent to another mirrored pair of connected drives using syncoid. Then, once a day, I upload encrypted daily snapshots to a bucket in the cloud using restic. Sounds complicated, but actually sanoid/syncoid and restic do all the heavy lifting. All I did is automate their schedules using systemd timers and some scripts to backup the right directories.

[–] doeknius_gloek@discuss.tchncs.de 1 points 10 months ago (1 children)

I upload encrypted daily snapshots to a bucket in the cloud using restic.

How do you upload a snapshot? I'm using TrueNAS where I can make snapshots visible in a otherwise hidden .zfs directory. Do you just backup from there or something similar? Is there an upside to backing up a snapshot instead of just the current data?

[–] dr_robot@kbin.social 2 points 10 months ago

How do you upload a snapshot?

Basically, as you said. Mount the data somewhere and back up its contents.

I back up snapshots rather than current data, because I don't want to stop the running containers that read and write from that data. I'd rather avoid the situation where the container is writing data while it's being backed up. The back up happens shortly after the daily snapshot is made so the difference between current and snapshot data is small.

[–] eskuero@lemmy.fromshado.ws 4 points 10 months ago

Daily, usually keeping only the last week or so

[–] computergeek125@lemmy.world 4 points 10 months ago

I'm probably the overkill case because I have AD+vC and a ton of VMs.

RPO 24H for main desktop and critical VMs like vCenter, domain controllers, DHCP, DNS, Unifi controller, etc.

Twice a week for laptops and remote desktop target VMs

Once a week for everything else.

Backups are kept: (may be plus or minus a bit)

  • Daily backups for a week
  • Weekly backups for a month
  • Monthly backups for a year
  • Yearly backups for 2-3y

The software I have (Synology Active Backup) captures data using incremental backups where possible, but if it loses its incremental marker (system restore in windows, change-block tracking in VMware, rsync for file servers), it will generate a full backup and deduplicate (iirc).

From the many times this has saved me from various bad things happening for various reasons, I want to say the RTO is about 2-6h for a VM to restore and 18 for a desktop to restore from the point at which I decide to go back to a backup.

Right now my main limitation is my poor quad core Synology is running a little hot on the CPU front, so some of those have farther apart RPOs than I'd like.

[–] z00s@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

Whenever I've gone too far forwards

[–] krash@lemmy.ml 2 points 10 months ago

Like you said, "it depends" 😁

I have a huge datablob that I mirror off-site once monthly. I have a few services that provides things for my family, I take a backup of them nightly (and run a "backup-restoration" scenario every six months). For my desktop, none at all - but I have my most critical data synched / documented so they can be restored to a functional state.

[–] lemmyvore@feddit.nl 2 points 10 months ago

I have autocron jobs that sync various server directories to a daily backup (on the same server), then sync that backup once a week to the weekly backup, and once a month take a tarball snapshot of the weekly backup.

Every once in a while I plug in a HDD on USB and take a Borg backup of the monthly dir. Borg does compression and deduplication (and encryption if you want to). I should be doing this also once a week but sometimes I'm lazy and leave a few weeks between them.

[–] ShortN0te@lemmy.ml 2 points 10 months ago

When you use deduplication on the backup side you can do backups every minute without needing much storage. When the backup programm looks at the filesystem to determine which file has changed, the CPU only need to process the changed files.

For my personal devices i do daily backups. There is not enough change every day.

[–] rentar42@kbin.social 2 points 10 months ago

IMO set up a good incremental backup system with deduplication and then back up everything at least once a day as a baseline. Anything that's especially valuable can be backed up more frequently, but the price/effort of backing up at least once a day should become trivial if everything is set up correctly.

If you feel like hourly snapshots would be worth it, but too resource-intensive, then maybe replacing them with local snapshots of the file system (which are basically free, if your OS/filesystem supports them) might be reasonable. Those obviously don't protect against hardware failure, but help against accidental deletion.

[–] BCsven@lemmy.ca 2 points 10 months ago

There should be a whitepaper you can reference based on sales scenario. As others have said hourly, daily, weekly snapshots are not backups, unless you also have a btrfs or zfs send that IS backing up the snapshots to another remote device

[–] Rootiest@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

It depends what I'm backing up and where it's backing up to.

I do local/lan backups at a much higher rate because there's more bandwidth to spare and effectively free storage. So for those as often as every 10 mins if there are changes to back up.

For less critical things and/or cloud backups I have a less frequent schedule as losing more time on those is less critical and it costs more to store on the cloud.

I use Kopia for backups on all my servers and desktop/laptop.

I've been very happy with it, it's FOSS and it saved my ass when Windows Update corrupted my bitlocker disk and I lost everything. That was also the last straw that put me on Linux full-time.

[–] kylian0087@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

Snapahots are not backups!

Snapshots are near instand in ZFS or BTRFS. Also they do not consome much CPU to make them.

Backups are not stored in the same device. What i use to make backups is a combination of borg and urbackup.

[–] bier@lemmy.blahaj.zone 1 points 10 months ago

stroj task runs daily the initial sync took forever tho because I only have 5MB UP connection

[–] vegetaaaaaaa@lemmy.world 1 points 10 months ago* (last edited 10 months ago)

7 daily backups, 4 weekly backups, 6 monthly backups (incremental, using rsnapshot). The latest weekly backup is also copied to an offline/offsite drive.

[–] conorab@lemmy.conorab.com 1 points 10 months ago
  • Personal and business are extremely different. In personal, you backup to defend against your own screwups, ransomware and hardware failure. You are much more likely to predict what is changing most and what is most important so it’s easier to know exactly what needs hourly backups and what needs monthly backups. In business you protect against everything in personal + other people’s screwups and malicious users.
  • If you had to setup backups for business without any further details: 7 daily, 4 weekly, 12 monthly (or as many as you can). You really should discuss this with the affected people though.
  • If you had to setup backups for personal (and not more than a few users): 7 daily, 1 monthly, 1 yearly.
  • Keep as much as you can handle if you already paid for backups (on-site hardware and fixed cost remote backups). No point having several terabytes of free backup space but this will be more wear on the hardware.
  • How much time are you willing to lose? If you lost 1 hour of game saves or the office’s work and therefore 1 hour of labour for you or the whole office would it be OK? The “whole office” part is quite unlikely especially if you set up permissions to reduce the amount of damage people can do. It’s most likely to be 1 file or folder.
  • You generally don’t need to keep hourly snapshots for more than a couple days since if it’s important enough to need the last hours copy, it will probably be noticed within 2 days. Hourly snapshots can also be very expensive.
  • You almost always want daily snapshots for a week. If you can hold them for longer, then do it since they are useful to restoring screwups that went unnoticed for a while and are very useful for auditing. However, keeping a lot of daily snapshots in a high-churn environment gets expensive quickly especially when backing up Windows VMs.
  • Weekly and monthly snapshots largely cover auditing and malicious users where something was deleted or changed and nobody noticed for a long time. Prioritise keeping daily snapshots over weekly snapshots, and weekly snapshots over monthly snapshots.
  • Yearly snapshots are more for archival and restoring that folder which nobody touched forever and was deleted to save space.
  • The numbers above assume a backup system which keeps anything older than 1 month in full and maybe even a week in full (a total duplicate). This is generally done in case of corruption. Keeping daily snapshots for 1 year as increments is very cheap but you risk losing everything due to bitrot. If you are depending on incrementals for long periods of time, you need regular scrubs and redundancy.
  • When referring to snapshots I am referring to snapshots stored on the backup storage, not production. Snapshots on the same storage as your production are only useful for non-hardware issues and some ransomware issues. You snapshots must exist on a seperate server and storage. Your snapshots must also be replicated off-site minus hourly snapshots unless you absolutely cannot afford to lose the last hour (billing/transaction details).
[–] ebits21@lemmy.ca 1 points 10 months ago

5 minutes after every computer boot to a NAS. Then nightly from the NAS to the cloud.

[–] Decronym@lemmy.decronym.xyz 1 points 10 months ago* (last edited 10 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
NAS Network-Attached Storage
Unifi Ubiquiti WiFi hardware brand
ZFS Solaris/Linux filesystem focusing on data integrity

4 acronyms in this thread; the most compressed thread commented on today has 10 acronyms.

[Thread #418 for this sub, first seen 10th Jan 2024, 07:05] [FAQ] [Full list] [Contact] [Source code]

[–] refreeze@lemmy.world 1 points 10 months ago* (last edited 10 months ago)

Every hour via Restic to a local Mino instance on my NAS. Once a day to backblaze B2. Once a week to an offline HDD in my fire safe.

Keep in mind the more often you backup the less total time each backup should take to run. If your backup software isn't too heavy to run and stores backups incrementally, there is little penalty to frequent backups.

[–] KpntAutismus@lemmy.world 1 points 10 months ago (1 children)

didn't have money for an external hard drive or anything like that growing up, so a lot of stuff got lost over the years. but when i upgrade my NAS' hard drive i will buy an enclosure and scrape all of the important stuff together. like recovery codes for my 3ds collection, old photos of my late cat. that kinda stuff. then i'll see how frequently i'm gonna update the data.

[–] lemmyvore@feddit.nl 1 points 10 months ago

Se if you can get a DVD or Blu-ray writer and backup stuff to DVD or Blu-ray discs. If you keep the discs in individual jewel cases or in a disc wallet they keep very well.