Backups are one of those things everyone knows they should do, but most people get wrong. The tools are either too complicated or too expensive. Cloud services want monthly subscriptions just to store your data on their servers. Time Machine works fine until the day you actually need to restore something and realize the backup got corrupted months ago. Manual backups never happen consistently because you forget, get busy, or both.
I am no better than anyone else in this regard, but I seem to have found the right tool that makes sure the stupid in me does not lose important data. It is called Zerobyte, an open-source backup automation tool that acts as a modern front end for Restic. I pair it with a simple cron job, and so far, this workflow has worked better than anything I have tried.
6 of the best open source backup options
If you're not already backing up your systems, here's where to start.
What Zerobyte actually does
It's an open-source tool that makes managing backups easy
Zerobyte is one of my favorite backup tools out there. It uses Restic for the actual backup engine and adds an intuitive web interface on top. Restic handles the encryption, compression, and deduplication. Zerobyte just makes those features accessible without typing complex commands every time you need to configure something.
All data gets encrypted client-side before it leaves your machine. Zerobyte ensures duplicate files are not stored twice by deduplicating identical chunks of data. The scheduling system lets you define automated backup jobs that run daily, weekly, or whatever interval makes sense. Retention policies determine how long to keep old backups before pruning them automatically. You can set rules like keeping daily backups for seven days and weekly backups for four weeks.
Backups can go to local drives or network shares, or cloud storage through various backends. Zerobyte supports local directories and NAS devices, SFTP servers, and cloud providers like S3 or Google Cloud. The web interface handles all configuration. You create backup jobs, check their status, browse snapshots, and restore files all from the same GUI. Notifications integrate with webhooks or services like Apprise so you get alerts when backups succeed or fail.
Installing and setting up Zerobyte
One Docker container and you're good to go
I set up Zerobyte on my Mac, and all it takes is a Docker container. Zerobyte is distributed as a Docker image with a compose file that defines how to run the container. The configuration looks something like this for basic local backups. You expose the web interface on port 4096 and map local directories so the tool can access your files.
services:
zerobyte:
image: ghcr.io/nicotsx/zerobyte:v0.21
container_name: zerobyte
restart: unless-stopped
cap_add:
- SYS_ADMIN
ports:
- "4096:4096"
devices:
- /dev/fuse:/dev/fuse
environment:
- TZ=Europe/Paris # Set your timezone here
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/zerobyte:/var/lib/zerobyte
The most important part is mounting the folders you want to back up into the container. For example, to back up your Documents folder, you add a volume mount that maps your macOS Documents directory to a path inside the container. Zerobyte running inside the container sees your files at that mounted path. Once the Docker compose file is ready, you start the container with a simple command in Terminal.
docker compose up -d
Docker downloads the Zerobyte image and runs it as a background service. After a few seconds, the web interface becomes accessible at localhost:4096 in your browser. You can choose what to back up and leave other things out. My aim was to back up the entire home directory and then use exclusion rules to skip caches and temporary files. Large media collections, like movie libraries, may need separate handling if you do not need versioned backups of every file. But for most personal data, backing up everything and using retention policies to manage old snapshots works just fine.
Zerobyte breaks the backup configuration into three pieces. Volumes define the source data. Repositories define where backups are stored. Backup jobs connect volumes to repositories using schedules and retention rules. Creating a volume involves giving it a name and selecting the type as a directory for local folders. The source path points to the mounted location inside the container. If you mounted your home directory to /backup/home, that becomes the source path. Zerobyte also lists available mounted paths to choose from.
For the repository, you define where backup snapshots are stored. A local directory works well for backups to an external drive or another volume on your Mac.
Adding Cron for extra control
Zerobyte's built-in scheduler works fine, too
Zerobyte's built-in scheduler works fine for most needs, but some situations benefit from using cron instead. You might want centralized scheduling of multiple tasks or prefer the familiarity of cron syntax. Cron also provides more control over exactly when and how backup commands execute. The approach is to use Restic directly from the command line on a cron schedule. Since Zerobyte uses Restic repositories under the hood, you can call Restic to perform backups that feed into the same repository.
You need to know the repository path and password before setting this up. The password is what Zerobyte stored when creating the repository. Editing the cron schedule involves running crontab -e in Terminal. This opens your user crontab file, where you add entries for scheduled tasks.
The backup command specifies the repository location and the paths to back up. You can list multiple directories separated by spaces. Adding exclude flags skips certain paths, like caches, if needed. Redirecting output to a log file captures what happened during each backup run. This helps diagnose issues if something goes wrong. The log appends to the file so you can review history over time.
One thing to remember is that cron jobs only run when the Mac is powered on and awake. If your machine sleeps overnight, the job might not execute.
Take backup seriously
Losing data is not fun, and relying on yourself to manually back up everything is a great way to discover how unreliable you actually are. I trust the robots with automation, of course, with some supervision. While Zerobyte does the job well, you should still build a backup strategy that keeps your files safe even if your NAS dies.
I self-host Syncthing to sync files between my PC, Mac, NAS, and other devices
Syncthing is a neat utility when you want multi-directional file synchronization for your home lab
