Newbie with basic questions

I just had a harddisk crash which has costed me about 1.500 $ for data recovery. So I did some websearch to find a solid backup solution. I got the trustful recommendation to use restic. And here I am. :slight_smile:

I am running several Manjaro Linux computers, also using a Nextcloud on my own space. All Linux systems are using btrfs. The system root volume and the subvolume @home should be backuped separately from the volume @home-data. By this, two backups are created for each machine.
The backups should be stored on some external USB harddisks.
In @home-data of each machine, there would be only data, which is often used or is actually worked with.
All data, which is archived and is only used occasionally should be stored either on Nextcloud or on USB-devices if files are too large.

Backups should run once a day at system start, in order to never forget to backup. Further I want to do a full backup for each machine once a week.
I do not know, how to backup the “archive”, I mentioned above.

I am not familiar with CLI and use of terminal. If I would use restic by CLI, I always would be anxious about doing something wrong or damaging something. This is resulting in a feeling of doubt, uncertainty and distrust.
Til now I have not found a GUI for restic covering all the different actions, one might use when doing backups. I found backrest and restic browser. And that’s all.

I have tried to learn restic by using the documentation. But I feel overwhelmed by all these informations. My profession is psychotherapy and not learning how to program something.

My idea for a solution in my use case:
As all my machines are using the same btrs volume structure and volume names, it should be possible, to create script files, which are executed at system start and other scripts, which can be started manually in oder to recover data from backups. But I don’t know, how to create such srcipts.

Now my question:
How can I start efficiently to set up a default backup routine, which fits to all my machines and fulfilling my wishes, I have described above?
And how to create a default restore routine, which fits to all my machines, selecting from existing incremental and full backups?

1 Like

Awesome, I also run Manjaro and Nextcloud. And restic :slight_smile: It’s hard to give you real technical advice in this but I just want to suggest you look for someone who can write those scripts for you, test them and make sure restoring works. Ideally there will also be some way for you to know when something fails and also regular, automated repository checks, e.g. to detect backup drive failure.

Using restic without understanding what you’re doing would be kind of dangerous, After all, you want to be sure you can restore if worst comes to worst. Imagine someone asks you for links to some tiktok videos because they want to treat a friend’s depression. Ok it doesn’t translate one to one but you understand what I’m trying to say?

Regarding the number of repositories I want to add that you might want to consider using one big repository for everything as restic doesn’t really care how often you back things up (like the archive) but it will deduplicate in case you backup the same things multiple times which will save you space. In addition, you won’t have to deal with multiple repositories. Each snapshot in a repo will still be tagged with the source path you backed up so you know what’s in there.

1 Like

It sounds like quite straightforward problem to solve. You already use BTRFS which should make very elegant solution overall with its capability to create stable file system snapshots. Unfortunately restic is CLI… so you either learn it yourself (it is not so hard) or like mentioned earlier find somebody to do this for you. Given your time and money already spent on data recovery I think it should give you good motivation to rethink and redesign all your backup strategy. Restic can be valuable part of it but do not make it your only option. BTRFS itself allows to send/receive incremental snapshots which could be perfect for local backup. Add to it restic for off site/cloud part of 3-2-1 backup approach and you will never have to spend another $ for disk recovery.

2 Likes

I am not happy with your answer. But I don’t give up, hoping someone else will give me the necessary support.

I just have got the Backrest UI, which is precisely what I have looked for. The backup of my /home and data was successful.
But the backup of my entire system w/o home did not work, because restic did not have the permissions to read from root.

In the Backrest Documentation, I have found this hint:

BTRFS Snapshot Management
[Command Hook Examples · Backrest]

Create and manage BTRFS snapshots for consistent backups.

Pre-backup Snapshot
Event: CONDITION_SNAPSHOT_START
Error Behavior: ON_ERROR_FATAL

#!/bin/bash
btrfs subvolume snapshot -r /your-btrfs-filesystem /your-btrfs-filesystem/.backrest-snapshot

Post-backup Cleanup
Event: CONDITION_SNAPSHOT_END
Error Behavior: ON_ERROR_IGNORE

#!/bin/bash
btrfs subvolume delete /your-btrfs-filesystem/.backrest-snapshot

But sorry, I don’t understand where to fill in something like this.

How can I set permissions, so that restic can do its job also on system volumes, inclusive /boot/efi if possible?

1 Like

Before you go this route please keep in mind that restic is not full system backup tool. Long story short is that it won’t allow you easily to restore fully working OS in case of some disaster.

What restic is good at is files based backup with cloud storage support. Ideal candidate for user data offline backup.

As I understand your case I would:

  1. use local BTRFS snapshots for both root and user volumes. There are multiple tools including GUI ones to help you with it.
  2. use BTRFS send/receive capability to maintain local backup of your systems. Destination can be external drive and/or remote machine
  3. use restic for off site backup of all user data

Thank you for your helpful answer. Actually I made some progress with all of this:

Concerning Backup of my System (Manjaro):
It seems to be difficult due to access limitations of users and groups. As my system runs on BTRFS, it generally generates always three snapshots via timeshift before each update via Pamac or Pacman. Therefor I already have three snapshots available… as long as he storage device won’t fail. Only in this case, it would be nice, to have an additional snapshot of the entire system.
But it is not easy, to backup those Timeshift snapshots because the backup program must have root access. And perhaps Timeshift must be running (idle) before there is any access to the snapshots.

Concerning backup of all my data:
I have set it up and it is running succesffully! Backrest does create the necessary json-file and does hand it over to Restic. It works flawlessly an I already have restored from Backup by using Restic-Browser which is a nice GUI for this.
Backrest is a nice GUI with many hover popups containing short explanations to nearly all setting items. But some are not well explained, such als “Backup-Flags” and “Hooks”. And I don’t see any settings for encryption of the backups. So I am uncertain about the security of the encryption of my backups.

My actual questions:
Although I am aware to write in a Restic forum and not in the not existent forum of Backrest: Could you please clarify, what encryption will be applied, if I use Backrest? Can I influence encryption by setting a “Backup-Flag” or a “Hook”?

In Backrest I can trigger a backup by setting a cron job or by setting date, time, day of week… If I do not use a cron job, what should I do, to set up a background service, which will trigger the start of a backup?

1 Like

@catherine, backrest uses restic to perform the backups. Restic uses encryption by default, all data is encrypted before it is stored into the repository.
That is why you cannot find settings for the encryption of the backup. There is simply no need to set or tune anything on that part.

If you want to get into the nitty gritty technical details you can read up here:
100_references.html#keys-encryption-and-mac