this post was submitted on 25 Jul 2023
192 points (98.0% liked)

Linux

48329 readers
708 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm trying to find a good method of making periodic, incremental backups. I assume that the most minimal approach would be to have a Cronjob run rsync periodically, but I'm curious what other solutions may exist.

I'm interested in both command-line, and GUI solutions.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 61 points 1 year ago (2 children)

I don't. I lose my data like all the cool (read: fool) kids.

[–] [email protected] 8 points 1 year ago

I too rawdog linux like a chad

[–] [email protected] 6 points 1 year ago
[–] [email protected] 33 points 1 year ago

Timeshift is a great tool for creating incremental backups. Basically it's a frontend for rsync and it works great. If needed you can also use it in CLI

[–] [email protected] 21 points 1 year ago (3 children)

I use Borg backup with Vorta for a GUI. Hasn't let me down yet.

[–] [email protected] 5 points 1 year ago

Borgmatic is also a great option, cli only.

[–] [email protected] 5 points 1 year ago

I use PikaBackup which I think uses Borg. Super good looking Gnome app that has worked for me.

load more comments (1 replies)
[–] [email protected] 16 points 1 year ago (3 children)

Is it just me or the backup topic is recurring each few days on [email protected] and [email protected]?

To be on topic as well - I use restic+autorestic combo. Pretty simple, I made repo with small script to generate config for different machines and that's it. Storing between machines and b2.

[–] [email protected] 17 points 1 year ago

It is a critical one. Maybe needs to be part of an FAQ with link to discussion.

load more comments (2 replies)
[–] [email protected] 11 points 1 year ago

I have a bash script that backs all my stuff up to my Homeserver with Borg. My servers have cronjobs that run similar scripts.

[–] [email protected] 9 points 1 year ago (1 children)

I use restic (https://restic.net/) which can use rclone to connect to a variety of backends (eg. onedrive, mega, dropbox etc.). Also, resticprofile (https://restic.net/) makes it easier to run (hides flags in the config file). I use it manually but a cron job would be easy to implement (a tutorial is here: https://forum.yunohost.org/t/daily-automated-backups-using-restic/16812).

[–] [email protected] 8 points 1 year ago

Restic does not need rclone and can use many remote storage services directly. I do restic backups directly to Backblaze.

[–] [email protected] 9 points 1 year ago (2 children)

I like rsnapshot, run from a cron job at various useful intervals. backups are hardlinked and rotated so that eventually the disk usage reaches a very slowly growing steady state.

[–] [email protected] 5 points 1 year ago

I also use it. Big benefit is also that you don‘t need a special software to access your backup.

load more comments (1 replies)
[–] [email protected] 9 points 1 year ago

Pika Backup (GUI for borgbackup) is a great app for backups. It has all the features you might expect from backup software and "just works".

[–] [email protected] 9 points 1 year ago (2 children)

I use Back In Time to backup my important data on an external drive. And for snapshots I use timeshift.

load more comments (2 replies)
[–] [email protected] 8 points 1 year ago

Exactly like you think. Cronjob runs a periodic rsync of a handful of directories under /home. My OS is on a different drive that doesn't get backed up. My configs are in an ansible repository hosted on my home server and backed up the same way.

[–] [email protected] 7 points 1 year ago

I do periodic backups of my system from live usb via Borg Backup to a samba share.

[–] [email protected] 7 points 1 year ago

Duplicity (cli) with deja-dup (gui) has saved my sorry ass many times.

[–] [email protected] 7 points 1 year ago

rsync + backblaze B2. Bafkblaze is stupid cheap.

Cost is about $10 per year.

[–] [email protected] 6 points 1 year ago (2 children)

Used to use Duplicati but it was buggy and would often need manual intervention to repair corruption. I gave up on it.

Now use Restic to Backblaze B2. I've been very happy.

load more comments (2 replies)
[–] [email protected] 6 points 1 year ago

Check out Pika backup. It's a beautiful frontend for Borg. And Borg is the shit.

[–] [email protected] 6 points 1 year ago (1 children)

Kopia or Restic. Both do incremental, deduplicated backups and support many storage services.

Kopia provides UI for end user and has integrated scheduling. Restic is a powerfull cli tool thatlyou build your backup system on, but usually one does not need more than a cron job for that. I use a set of custom systems jobs and generators for my restic backups.

Keep in mind, than backups on local, constantly connected storage is hardly a backup. When the machine fails hard, backups are lost ,together with the original backup. So timeshift alone is not really a solution. Also: test your backups.

[–] [email protected] 3 points 1 year ago

I really like kopia

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

I rotate between a few computers. Everything is synced between them with syncthing and they all have automatic btrfs snapshots. So I have several physical points to roll back from.

For a worst case scenario everything is also synced offsite weekly to a pCloud share. I have a little script that mounts it with pcloudfs, encfs and then rsyncs any updates.

[–] [email protected] 5 points 1 year ago

I don't, really. I don't have much data that is irreplaceable.

The ones that are get backed up manually to Proton Drive and my NAS (manually via SMB).

[–] [email protected] 5 points 1 year ago (1 children)

BTRFS filesystem, Snapper for taking periodic snapshots and snap-sync for saving one to an external drive every now and then.

BTRFS is what makes everything incremental.

load more comments (1 replies)
[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

by the way, syncthing is great if you need bi-directional sync.
not exactly what you're looking for (sth like Duplicacy?) but you should probably know about it as it's a great tool.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

Restic since 2018, both to locally hosted storage and to remote over ssh. I've "stuff I care about" and "stuff that can be relatively easily replaced" fairly well separated so my filtering rules are not too complicated. I used duplicity for many years before that and afbackup to DLT IV tapes prior to that.

[–] [email protected] 4 points 1 year ago

Git projects and system configs are on GitHub (see etckeeper), the reset is synced to my self-hosted Nextcloud instance using their desktop client. There I have periodic backup using Borg for both the files and Nextcloud database.

[–] [email protected] 4 points 1 year ago (1 children)

I use rsync+btrfs snapshot solution.

  1. Use rsync to incrementally collect all data into a btrfs subvolume
  2. Deduplicate using duperemove
  3. Create a read-only snapshot of the subvolume

I don't have a backup server, just an external drive that I only connect during backup.

Deduplication is mediocre, I am still looking for snapshot aware duperemove replacement.

[–] [email protected] 3 points 1 year ago (3 children)

I'm not trying to start a flame war, but I'm genuinely curious. Why do people like btrfs over zfs? Btrfs seems very much so "not ready for prime time".

[–] [email protected] 5 points 1 year ago

Features necessary for most btrfs use cases are all stable, plus btrfs is readily available in Linux kernel whereas for zfs you need additional kernel module. The availability advantage of btrfs is a big plus in case of a disaster. i.e. no additional work is required to recover your files.

(All the above only applies if your primary OS is Linux, if you use Solaris then zfs might be better.)

[–] [email protected] 5 points 1 year ago (1 children)

btrfs is included in the linux kernel, zfs is not on most distros
the tiny chance that an externel kernel module borking with a kernel upgrade happens sometimes and is probably scary enough for a lot of people

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 4 points 1 year ago

All my devices use Syncthing via Tailscale to get my data to my server.

From there, my server backs up nightly to rsync.net via BorgBackup.

I then have Zabbix monitoring my backups to make sure a daily is always uploaded.

[–] [email protected] 3 points 1 year ago

dont keep anything u would be upset to lose /s

[–] [email protected] 3 points 1 year ago

timeshift with system files and manually my home folder

[–] [email protected] 3 points 1 year ago

I do a periodic backup with Vorta towards my server. The server does a daily backup to an S3 service with Restic

[–] [email protected] 3 points 1 year ago

I just run my own nextcloud instance. Everything important is synced to that with the nextcloud desktop client, and the server keeps a month's worth of backups on my NAS via rsync.

[–] [email protected] 3 points 1 year ago (1 children)

Use synching on several devices to replicate data I want to keep backups of. Family photos, journals, important docs, etc. Works perfect and I run a relay node to give back to the community given I am on a unlimited data connection.

load more comments (1 replies)
[–] [email protected] 3 points 1 year ago

DejaDup on one computer. Another is using Syncthing, another I do a manual Grsync. i really should have a better plan. lol

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

I use btrbk to send btrfs snapshots to a local NAS. Consistent backups with no downtime. The only annoyance (for me at least) is that both send and receive ends must use the same SELinux policy or labels won't match.

[–] [email protected] 3 points 1 year ago

I use Rclone which has both an WEBUI and CLI.

[–] [email protected] 3 points 1 year ago

At the core it has always been rsync and Cron. Sure I add a NAS and things like rclone+cryptomator to have extra copies of synchronized data (mostly documents and media files) spread around, but it's always rsync+Cron at the core.

[–] [email protected] 2 points 1 year ago

Github for projects, Syncthing to my NAS for some config files and that's pretty much it, don't care for the rest.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Setup

Machine A:

  • RAIDz1 takes care of single-disk failure
  • ZFS doing regular snapshots
  • Syncthing replicates the data off-site to Machine B

Machine B:

  • RAIDz1 takes care of single-disk failure
  • ZFS doing regular snapshots
  • Syncthing receiving data from Machine A

Implications

  • Any single-disk hardware failure on machine A or B results in no data loss
  • Physical destruction of A won't affect B and the other way around
  • Any accidentally deleted or changed file can be recovered from a previous snapshot
  • Any ZFS corruption at A doesn't affect B because send/recv isn't used. The two filesystems are completely independent
  • Any malicious data destruction on A can be recovered from B even if it's replicated via snapshot at B. The reverse is also true. A malicious actor would have to have root access on both A and B in order to destroy the data and the snapshots on both machines to prevent recovery
  • Any data destruction caused by Syncthing can be recovered from snapshot at A or B
load more comments
view more: next ›