3 ms·
I would recommend restic with B2. Really simple to set up. I use it for nightly homedir backups for multiple machines. Currently at ~400GB and it's costing me <
by l3s2d 6y ago
I would recommend restic with B2. Really simple to set up. I use it for nightly homedir backups for multiple machines. Currently at ~400GB and it's costing me < $3/month.
- qmmmur 6y agoDo you automate your process somehow? I'm trying to develop a strategy where if I open my laptop after a certain time it backups in the background. My go to for this kind of thing was hammerspoon but it won't execute the shell task in the background thread and completely locks my machine. I guess I could cron it?
- Fritsdehacker 6y agoI've made systemd profiles and timers to do restic backups. It's really clean and works well. Also much better testable than cron. It will most likely also work for more complex scenarios, like you're mentioning.
- qmmmur 6y agoAny chance you could clue me in on the scripts? Or point me to some resources to learn systemd? I've really disliked cron since having to use it for some auto push CI/CD stuff.
- ac29 6y agoI just set this up last week, and it works well: https://fedoramagazine.org/automate-backups-with-restic-and-systemd/ https://fedoramagazine.org/automate-backups-with-restic-and-... edit: one gotcha is that using "user" systemd units, they will only run when the user is logged in. So, for a personal device like a laptop, this is fine, but for a server, it might not do what you're thinking. For the server use case, you probably want to enable linger for that utility user, so that units will run even with no active logged in sessions: # loginctl enable-linger username
- kwesthaus 6y agoI also use restic and I have a cron script which runs early Monday morning every week. Restic supports auto-pruning, so I have it set up to backup a new snapshot then purge all except the most recent 100 years, 12 months, and 5 weeks.
- l3s2d 6y agoI use a systemd user service. It sounds like you're on OS X, so you won't have systemd. Cron should work. Here are my systemd files for reference. Service: [Unit] Wants=network-online.target After=network-online.target [Service] Type=simple ExecStart=/bin/bash -c "/usr/bin/restic unlock && /usr/bin/restic backup --verbose --one-file-system --exclude-caches --exclude=$XDG_CACHE_HOME %h && /usr/bin/restic forget --keep-last 5 --prune && /usr/bin/restic cache --cleanup --max-age 30" [Install] WantedBy=default.target Environment (fill these in with your keys): [Service] Environment="B2_ACCOUNT_ID=" Environment="B2_ACCOUNT_KEY=" Environment="RESTIC_REPOSITORY=" Environment="RESTIC_PASSWORD=" Timer: [Timer] OnCalendar=*-*-* 00:30:00 RandomizedDelaySec=20min [Install] WantedBy=timers.target