How I backup

Some people have asked, so here is how I do my backups. It takes me about ten seconds per day and five minutes per month to maintain.

It works well for me, but I’m always open to suggestions. Just email me with any ideas or questions.

every-day documents (~40 GB)

Files I use and change every day: documents, emails, code, diary, ideas, website, accounts, etc.

I’ve written shortcuts for these rsync commands so it’s really as simple as me typing bkz or bkstick in the terminal as I’m working anyway. I do it a few times a day, especially if I’ve just made or saved something of value. And always right before I shut down the computer, which I do almost any time I step away from it for more than a few minutes. That’s why I say it’s like ten seconds a day, just typing that command occasionally.

keepsakes (~3 TB)

Rarely-accessed files I want to keep forever: videos and photos of my kid, music and film collection.

So that’s five copies of my keepsakes in four different locations. Each one also has a recent copy of my every-day documents from above. So a few minutes a month to connect the USB drives, and I only do the safe deposit box when I’m going that way anyway, and only takes a couple minutes.

In the days of spinning-platter hard drives, they used to die surprisingly often, so I like the security of many copies. But it also helps to have some deliberately behind others, so on the rare case where I’ve deleted something, then rsynced my dailies and even my monthly, then realized I need that thing I deleted, then I know the drive in the safe deposit box has it since I haven’t updated that one in a couple months.

Your thoughts?
Please leave a reply:


Comments

  1. Alexandre Araujo (2024-02-27)

    Hey Derek!

    Pretty cool strategy. I always like the simplicity you put on your systems.

    PS: Since you use Linux/OpenBSD, why keep a MacOS formatted HD?

    Regards,
    Alexandre
    Mac laptop, though I’m not a fan of Apple, it was the best silent fanless laptop for my recording booth. — Derek

  2. Luc Gommans (2024-02-27)

    I would make two suggestions:

    1. Test your backups. I see no testing procedure described, and although maybe your scripts have spot checking beyond what is described in the article, code will only ever catch the cases it was programmed to expect.
    Manual testing does not have to be frequent, but making sure the backups are still recoverable and complete (spot check some old and new files) every six months helps ensure no silent issues are occurring

    2. Less importantly: use append-only backups to an independent system. While ransomware for consumers is comparatively rare these days, it would give me peace of mind. Your deposit box mostly fulfils that purpose, but whether it gets filled with bogus data or wiped by the malware is a matter of luck in timing (with the odds heavily in your favor due to the irregular connection of the drive and the existence of another computer that the malware probably isn't programmed to expect).
    Of course, "append only" is a bit of a misnomer because eventually you'd run out of space, but the system should independently delete old data rather than being able to command it remotely (from the potentially infected system) to wipe anything. For those who want such a setup, Restic has docs with considerations for data deletion in an append-only setup (disclose: I helped write them), not sure if external links are okay here
    Thanks for the thoughtful advice, Luc! — Derek

  3. Linkinverse (2024-02-27)

    I used to rsync my 40GB as well, but they quickly became 90 GB.
    Its not that much, and it was also very quick, BUT, I started to think about it differently and decided to export my Outliner to PLAIN-TEXT and then separate text information and data.

    Now everything is exaclty the same, except I backup only 15 MB of text, that includes only the NAME of the program, or the NAME of the interesting PDF article, or the DVD or bluray with the code project, all stuff I will not update anymore, frozen and unsorted, in case I will make a new version of it.

    I separated info from data. The index of a book from the actual pages.

  4. Mike McFlaber (2024-02-27)

    Thanks Derek, I always enjoy your techy posts!

    How do you do the Linux/MacOS usb stick part?
    Do you boot the other OS and do it from there? Or is the drive just formatted with the respective filesystem? (I'm assuming your laptop/desktop usually run OpenBSD)

    Thanks again,

    Mike
    I'm currently using a Linux desktop and Mac laptop, so it's just a USB stick in whatever computer I'm on, encrypted by the OS. Switched away from OpenBSD a few months ago so that I could try having a local ZFS internal drive. — Derek

  5. Ross (2024-02-27)

    Is there anything particular you look for in a hard drive for these backups?
    No. I haven't bought a hard drive in years, but if I did I'd probably just take a minute to see which model people say is reliable. — Derek

  6. Greg (2024-02-27)

    Any idea how much each of these cost?
    $10/month for zfs.rent + €10/month for Hetzner. The other costs are free side effects of existing costs, like I'm already running a server, so I use the extra space on it to store my dailies. And already have a safe deposit box so I also keep a hard drive in it. — Derek

  7. Branden (2024-02-27)

    I'm a big fan of Syncthing (FOSS). Perhaps worth a look. It's secure and syncs reliably without any attention. Great for frequently changing files (ie. documents) and for backing up phone photos, etc.
    I hear great things about Syncthing from everyone. — Derek

  8. Anil (2024-02-28)

    A question regarding photos: Do you use any software for tagging e.g. name of persons, locations etc. so that it's easier to search later? This feature is present in Google Photos and that's the reason I couldn't let go of it.
    No, I do it myself. When exporting the photos out of my phone/camera into the filesystem, I name them like 2024-02-28-George-Yohokama-1.jpg so I have the date, place, and person in the filename itself, therefore not dependent on any external tagging system. — Derek

  9. Aquiles (2024-02-28)

    Interesting approach, I like the safe-deposit box!

    I have a raspberry pi with an 8TB disk. I use rsync to it when I’m at home (so it’s quick). Once a week the raspberry uses duplicity to push a copy to a remote location with some redundancy in place.

    In this way, if I have to quickly recover from a stolen laptop or the likes, I am an rsync away. If I need to recover from deleted files, or a major disaster, im a duplicity away.

    When I’m on the road for longer, I use Nextcloud to push things to my raspberry at home.
    Perfect! I love this. My ideal is to then keep another little Pi like this at a friend's house on the other side of the world. — Derek

  10. roman (2024-02-28)

    oh, zfs! have you switched to freebsd or something else? any other reasons to switch away from openbsd? thank you
    My little ZimaBoard - www.zimaboard.com/zimaboard/product - in the closet is running FreeBSD for the ZFS backup. My server is still OpenBSD, and currently switching from Arch to Alpine Linux for the desktop. I like to switch up my OS occasionally to make sure my scripts (and knowledge) are cross-platform. — Derek

  11. Jon (2024-02-28)

    Kopia with BackBlaze is what I use.

  12. Ryan Collins (2024-02-28)

    Any reason you haven't automated the rsync scripts?

    I put too much trust in the cloud systems so your post may be the wake up call to get off my butt and set something like this up.

    However, my daily stuff is almost all Markdown files in a Git repo, so that's already distributed between several machines I use. But, the most pressing files that I need to back up are photos. They're currently in Flickr, Amazon Photos, and iCloud, but each have different sets of photos. I need to combine all of them and set up something, but that's a big undertaking. 😁
    I like to do it intentionally. Like if I've only been working in the browser, not altering my filesystem, then there's no need to backup anything. But if I've been editing or creating a bunch of files, then I'll back up at that moment. Kind of like the choice to hit Ctrl-S “save” in a program, and really goes just as fast. I just type “bkz” and it’s done in 2 seconds. — Derek

  13. Will (2024-02-29)

    Hi Derek!

    Thanks for sharing this! I am in the process of figuring out how to organize my data after listening to one of your podcasts where you talk about tech independence, literally listened it last week! I have a natural tendency of over-complicating things and your process is awesome because of how simple it is! Very inspiring!

  14. PKNY (2024-02-29)

    I have a Linux server at home that runs on a tiny PC form factor computer that performs multiple functions, including a Samba file server. We have various computers at home for each user, and everyone has their home directory on the server mapped on their computers. All files that are considered important enough to be backed up need to be in a directory in their home directory; this way, we don't have to worry about doing regular backups of each computer/device.

    This Linux computer has two external USB drives mounted:

    /home
    /backup

    A script that runs daily via cron calls rdiff-backup to backup files from /home to /backup.

    I also use two other USB drives for off-site backup storage. Both drives are encrypted via LUKS. One is stored at a close location (less than 10 miles from home), and the other is located at a location over 100 miles away that I visit on a semi-regular basis. I bring the 'close' hard drive home on an at-least weekly basis to run rdiff-backup to collect updates. When I know I'm going to visit the 'far' location, I bring the 'close' drive home, update its contents via rdiff-backup and bring it with me to the 'far' location to swap out. The the 'far' drive is brought home, connected and updated via rdiff-backup and brought to the 'close' location.

    I have some important files stashed on one of the cloud storage providers using the free tier. At some point I might look into supplementing the backup strategy above with a full cloud backup scheme, but I feel comfortable with the current configuration.
    I love this! It sounds ideal. — Derek

  15. Grégory Marchal (2024-02-29)

    BorgBackup scripts managed by cron/anacron. Hourly automatic backup on an external hard drive and daily automatic append-only backup on Rsync.net storage (400 km away). BAM!
    Sounds great! — Derek

  16. Grégory Marchal (2024-03-01)

    To be fair about my comment (#15), my backup strategy was highly inspired by this: drewdevault.com/2019/01/13/Backups-and-redundancy-at-sr.ht.html

  17. Daniel (2024-03-06)

    Thank you Derek. You once mentioned you also carry notes on your phone. How do you handle that?
    I don't anymore, but I used to just copy the text files to the MicroSD card in my phone then open them with the built-in text viewer. — Derek

  18. Anson (2024-05-01)

    On Bruce Schneiers blog its said that encryption for data-at-rest is an issue. Better used for data-in-transit.
    Otherwise subject to bit rot. Unrecoverable encrypted back ups :(
    I don't know the work-around or middle ground though. Anyone?

  19. Damian Surr (2024-05-08)

    I can highly recommend Syncthing, runing on all devices.

    Typing 'bkz or bkstick in the terminal’ a few times per day may be minimal, but it's not as minimal as doing nothing, ever. :-)

    All latest files, always exactly where you want them, no matter what machine you're using.

    Syncthing seems pretty bulletproof and 'just works' once it's been set up. It also (somehow) works anywhere in the world. I don't pretend to know how my laptop can find my home server when I'm in a coffee shop, but it does.

    I have the whole family in scattered locations, syncing their devices to my home Linux server. Then, the home server auto backs everything up to my cloud service (I went with SpiderOak ONE for that).

    Hope that's useful to someone.

    Cheers,
    Damian
    I’ve also heard nothing but praise for Syncthing. — Derek

  20. rando (2024-11-24)

    github.com/bup/bup

    I use bup. It's blazing fast at saving files and doesn't store the same data twice; hence, each backup after the first will only take up a bit more space for any new files saved.

  21. prasanna (2026-04-02)

    hey Derek. How do you backup your postgres db? the main one managed by the sivers/sivers repo in github?

    does it live locally in your laptop/desktop, or in your server?
    Lives on my server. (For example this comment was posted to the database.) Every hour a pg_dump from the live db, copied to a few backup fileservers around the world. Then I pull it into my home computer every few days. — Derek

  22. prasanna (2026-08-02)

    > Lives on my server. (For example this comment was posted to the database.) Every hour a pg_dump from the live db, copied to a few backup fileservers around the world. Then I pull it into my home computer every few days. — Derek

    That's one way. From server to your local computer.

    How do you handle the other way? How does the new data you added to your db during local coding end up on the server?
    I guess you just upload it to server and overrwite the server's db with it?
    Yes I just rsync from my computer to the server, but I don't add new data to the local copy of my database. — Derek