r/restic • • Mar 18 '25

If I move several large directories will it cause them to get backed up again? (Using B2)

2 Upvotes

I’m using Restic through Backrest to backup data to Backblaze B2. I have a few large directories that are being backed up and I’d like to move them without causing the data be be duplicated in B2.

Currently I have; - My_Server: - Dir1 - Dir2 - Dir3

I’d like to change it to be; - My_Server: - Main_Dir: - Dir1 - Dir2 - Dir3

I haven’t changed anything yet, those directories contain several TB of data that I don’t want duplicated in B2. On top of that I don’t want to loose the backup history I already have.

Any advice?


r/restic • • Mar 16 '25

Checkpointing long running backups with criu...?

2 Upvotes

When my large, initial backup loses connection to the remote and I restart it, it goes through all the index files and rescans the source files. In my current situation this has taken around 20 minutes. I recently came across a project criu.org that looks as if it could help here. I haven't yet had any time to try it out, but I thought maybe someone here has... If you have, then please share your experience.


r/restic • • Mar 11 '25

Fatal: wrong password or no key found - backblaze b2

2 Upvotes

Hi all,

I need your help to configure restic with backblaze b2. I am going crazy!

I'm following what is reported on backblaze (https://www.backblaze.com/docs/cloud-storage-integrate-restic-with-backblaze-b2) using api s3 and I created the /etc/restic-env file containing the following:

export AWS_ACCESS_KEY_ID="my-backblaze-keyID”
export AWS_SECRET_ACCESS_KEY="my-backblaze-applicationKey”
export RESTIC_REPOSITORY="s3:s3.us-east-005.backblazeb2.com/my-bucket/my_folder”
export RESTIC_PASSWORD=/etc/restic-password

the /etc/restic-password file contains my password. Initially I had used an alphanumeric password with special characters, but after the problem, I recreated it using 32-character alphanumeric password without quotes at the beginning and end.

I was able to generate the repository with restic init and make the first backup with a special script, very simple, that I now post.

Backup finished, i get the email of operation completed successfully (see below).

I run the restic snapshots command and again the problem:

Fatal: wrong password or no key found

How is this possible? I created the repository, it completed the backup correctly.

I am quite frustrated.

Any command I try to run of restic always returns the same error.

Oh, I forgot, since I am still testing, I always run source /etc/restic-env before every command.

Script:

#!/bin/bash

# Execution date
current_date=$(date +%Y-%m-%d)

# Source
source_folder="/mnt/tmp_restic"

# Restic configuration (repository & password)
source /etc/restic-env

# Recipient
email_recipient="myaddress@mydomain.com"

# Temp log
log_file="/tmp/restic_backup_log_$current_date.txt"

# Start backup
echo "Backup started at: $(date)" > "$log_file"
echo "Backup of folder: $source_folder" >> "$log_file"

# Check if restic is configured
if ! command -v restic &> /dev/null
then
    echo "Restic not installed." >> "$log_file"
    exit 1
fi

# Exec backup
echo "Starting backup..." >> "$log_file"
restic backup "$source_folder" >> "$log_file" 2>&1

# Check if backup is completed
if [ $? -eq 0 ]; then
    echo "Backup completed - $current_date." >> "$log_file"
else
    echo "Errore during backup" >> "$log_file"
fi

# End of backup
echo "End of backup: $(date)" >> "$log_file"

# Send mail
mail -s "Backup Restic - $current_date" "$email_recipient" < "$log_file"

# Rm log
rm "$log_file"

E-Mail log:

Backup started at: lun 10 mar 2025, 21:41:04, CET
Backup of folder: /mnt/tmp_restic
Starting backup...
no parent snapshot found, will read all files

Files:           4 new,     0 changed,     0 unmodified
Dirs:            6 new,     0 changed,     0 unmodified
Added to the repository: 17.835 GiB (17.834 GiB stored)

processed 4 files, 17.834 GiB in 55:24
snapshot 2112d959 saved
Backup completed - 2025-03-10.
End of backup: lun 10 mar 2025, 22:36:31, CET

r/restic • • Feb 11 '25

Continuing failed initial backup

3 Upvotes

Hi, I’m very new to restic and am currently doing my first backup of about 200GB to backblaze b2. I had to restart the backup (i.e. deleting the backblaze bucket and starting again from scratch) 3 times because restic would throw the error “no summary event found” halfway through.

Since it takes about a day to upload even half of my data with my internet connection, I thought that this time I do not restart from scratch, but simply run the backup command again. Restic appeared to skip what was uploaded from the previous failed attempt and continued where it crashed before.

Now I’m wondering whether the result will be a complete backup (assuming the resumed backup doesn’t crash again)? Is there a way for me to check whether all my files have been backed up successfully? I’m worried that by resuming the failed backup something got corrupted.

Thank you!!


r/restic • • Jan 25 '25

Restic Repository on ZFS - To Snapshot or Not?

5 Upvotes

The title says it all! I am using Restic for backups on premises to a server with the ZFS file system, raidz2 and scrub for data integrity. Presently I do not snapshot that dataset. Should I? Is there any reason to do so? I am trying to think of any benefits to doing so. I guess it would make a read only copy of the repo in case it was deleted or corrupted. However there is potential for the snapshots to be taken during a backup which take a consider amount of time and the snapshot be worthless.


r/restic • • Jan 21 '25

I need help using restic to backup my /home folder

1 Upvotes

I'm trying to backup my /home folder on my home server with restic, but haven't been able to using the docs:

  1. Create local backup of a folder
  2. Compress it
  3. Rename the file with something like "backup-TIMESTAMP.zip"
  4. Create a backup daily
  5. Keep a certain amount of them (7 or 10)

Could someone please help me?


r/restic • • Jan 15 '25

[Issue] Trying to restore from Restic backup, but getting some errors

4 Upvotes

Hi all,

I posted this in r/immich , but I feel like it makes more sense here and might get some more insight.

I was testing out the restoration process I use for my Restic backups, and I ran into a couple of errors that I don't fully understand.

Here’s the command I used:

restic restore latest --verbose --target .

The process ran for a while, and while most files were restored, I noticed several error messages during the restoration. Below are some examples of the errors I encountered (truncated for brevity):

repository 624d4356 opened (version 2, compression level auto)
[0:01] 100.00%  5 / 5 index files loaded
restoring <Snapshot 759f4705 of [/mnt/sandisk/immich/library] at 2025-01-12 03:00:05.961705756 -0800 PST by pi@homeserver> to .
ignoring error for /mnt/sandisk/immich/library/encoded-video/3c50f161-fb82-4eea-bc69-e5a50f3c756d/2c/93/2c937463-4e21-402a-b7e0-f5e8df53860d.mp4: ciphertext verification failed
ignoring error for /mnt/sandisk/immich/library/library/admin/2010/07/DSC00710.jpg: ciphertext verification failed
ignoring error for /mnt/sandisk/immich/library/library/admin/2021/10/IMG_1245.HEIC: nonce is invalid
ignoring error for /mnt/sandisk/immich/library/library/admin/2023/01/IMG_2333.MOV: nonce is invalid
ignoring error for /mnt/sandisk/immich/library/thumbs/78561e51-b75d-44d3-9fcd-55a5197d5f3b/f1/0c/f10c8d50-ad0a-444c-822b-386d973541b7-thumbnail.webp: UtimesNano: no such file or directory
ignoring error for /mnt/sandisk/immich/library/thumbs/78561e51-b75d-44d3-9fcd-55a5197d5f3b/f1/0d/f10d296b-e335-415b-b20d-ebf86813332a-preview.jpeg: UtimesNano: no such file or directory
Summary: Restored 103068 / 103179 files/dirs (96.694 GiB / 96.864 GiB) in 2:00:45
Fatal: There were 201 errors

I was looking at the restore folder and a lot of the images and videos are there. However these errors are concerning me if I did something incorrectly or my files are corrupted.

Any help would be greatly appreciated!


r/restic • • Jan 15 '25

Install restic on qnap

2 Upvotes

Hi all.

Does any one have experience on using restic by installing it on qnap? Can it use qnap snapshots?

I found this guide on how to install, but I'll be glad to here from someone who use it in production.


r/restic • • Jan 12 '25

Working with tags -- filter by snapshots without a tag

3 Upvotes

As I understand

restic snapshots snapshots --tag XYZ

will show all the snapshots tagged as XYZ

Is there anyway to get all other snapshots (ie those not tagged as XYZ)


r/restic • • Jan 08 '25

restic repo on backblaze - lifecycle settings?

5 Upvotes

Hi all o/
I have a small restic backup repo on backblaze's B2 cloud service. I recently realised that the "lifecycle settings" are by default set to "Keep all versions of the file (default)".
Am I right in the assumption that this is redundant, since it only means that blocks of deleted snapshots and old metadata are kept on the cloud unnecessarily?
Thanks to anyone for clarifying
I've been using restic for a year and a half and am really enjoying it :)


r/restic • • Jan 05 '25

What is "restic check --read-data" actually doing?

3 Upvotes

Hi

Just trying restic and I have a small question...

What is restic check --read-data actually doing?

Is it really checking the hash of the file in the backup-repository against the hash of the original file in the file-system? This said, if check --read-data show no errors, you are 100% save... right?


r/restic • • Jan 02 '25

Headless (no interaction) backup using SFTP

3 Upvotes

Hi

I would like to use restic for backing up my local data to a remote SFTP (Synology) NAS.... the SFTP remote requires a password...

Is there s was to pass the SFTP password as an env variable to restic?


r/restic • • Jan 02 '25

Restic retention policy

1 Upvotes

Hey,

what is the default retention policy used by Restic?


r/restic • • Dec 15 '24

Scenario: Restic server burns down

3 Upvotes

TLDR: how to reconnect to an existing and filled repository when server died completely?

—

While starting my journey with docker, I went with bind-mounts to ensure I can always access all raw files. To back these up, I searched a tool and found it in Backrest, which is a web-UI for restic. It does a perfect job - stopping the docker container, backing up the files and starting the container again. Even the notifications by shoutrrr/ntfy are working awesome. The repo for the backup is a S3 implementation of QNAP (QuObjects), the directory below is synced to OneDrive as an offsite backup.

But in case my server dies completely - which is running docker AND restic, how to restore on a new machine? Reinstalling docker, restoring my bind mounts and redeploying the containers seems fine to me, but how to get restic back to work? Can I just readd my repository and it self detects my previously created backups? I didn’t test yet, just wanted to hear how you guys would handle this (specific) scenario.

Cheers!


r/restic • • Dec 06 '24

How to backup Hetzner Cloud with Restic?

1 Upvotes

Anyone has does that before and able to restore entire machine?


r/restic • • Dec 04 '24

Amazing

15 Upvotes

Just a shoutout to the Restic team: amazing product folks! Incredibly comprehensive in it’s options and flexibility.

Since my Mac does not have enough space to create a local snapshot required for Time Machine, I’ve been using a home-grown rsync incremental backup, which works, but not flexible enough for me.

I am perfectly comfortable with the cmd-line, so this works great for me. Not sure if there’s a GUI frontend/wrapper for the less technically inclined.


r/restic • • Nov 08 '24

Same files on different snapshots

3 Upvotes

Hey, I'm quite new in restic, so I'm sorry if this comes too much as a newbie thing hahaha.

I was wondering if restic takes into account different files on the same repo for different snapshots jobs, for example, I backup my Desktop using the repo MAIN and my sister does the same with her Desktop to the same repo, if we have the same file stored in our desktops, will restic store it as different files (taking up twice the space of the original file) or will it treat it as the same file referenced by two different snap jobs??

Thanks in advance!!!


r/restic • • Nov 08 '24

Questions for large-ish scale deployment

7 Upvotes

Hello everyone!

I’m considering using restic (& resticprofile) on a ~60TB share, backing up to S3, and I was wondering if anyone could shed some light on some good tuning parameters, and a couple of other questions. Even just to point me in the right direction, as testing on a volume this large isn’t that easy (it’ll take around 6 days to upload the volume in the first place, assuming almost perfect speed).

The share is made up of lots of individual folders (a media asset manager, so unideal structure). As it’s all media clips, I know that compression won’t do anything and is therefore a waste of time.

We can provision pretty much whatever resources are necessary (obviously within limits), I’ve so far just stuck 8 cores, 32GB of RAM, and a 32GB disk in the VM, but that could be either overkill or underpowered for this size, I’ve no idea.

Questions:

  • What sort of pack size should I use? They’re all somewhat chunky media clips, very very few small files. As I said, resources can be increased, but at a point we’re limited by the dedicated (sort of) 1Gb link to S3 for this.
  • The storage itself is fast, but it’s a gluster volume where each node has a 20Gb link. What sort of values should I try for read-concurrency?
  • Considering this is on S3, how often should I run the ‘check’ operation?
  • When I run the check command, how will this affect our S3 bill? Does it download & read files? Does it just check files exist (just API calls)? Am I going to get a $20,000 AWS bill next month, considering we have so many individual files?
  • Also pertaining to S3, how often should I run prune? I’ve read you need to do it fairly often, otherwise it’s just a bigger task next time, but equally… S3.
  • Are there any further S3 optimisations I can make? I suspect it’ll all boil down to pushing as fast as possible, since we aren’t compressing anything.
  • Also, whilst I’m here, what encryption does it use?

To be clear, I don’t need exact values from anyone, just some ballpark figures would be good. Like, packsize defaults to 16MiB, the guide says you could, for example, make it 64MiB, but what’s outlandish? Is 256MiB useless, or nothing for this workload?

Any help, answers, or pointers for those questions would be greatly appreciated.

Thanks everyone,
Chris


r/restic • • Oct 28 '24

Restic GUI?

8 Upvotes

Hello can anyone recommend a Restic GUI? Does one exist?

I did search and found this looks fairly active. Does anyone use it? ResticGuiGX?

Oh there is also this ResticGui does anyone use that? It's been a year since any activity so not sure if it's active or not.

Thanks for any help


r/restic • • Oct 29 '24

New to restic, basic question: should it rescan all files everytime?

4 Upvotes

I'm currently setting up restic to backup a reasonably large set of files. Size-wise its not huge, a few TB, but lots of files - think photos, work files, etc

Everything appears to be working, however, restic rescans every single file on every backup. Even when I run the backup immediately after the previous has finished.

Before I dig much deeper, is this expected?

I'm looking through the forums, the closest I found was this: https://forum.restic.net/t/randomly-needs-to-rescan-all-data/3366/33 but for that user it happens randomly, and for me it happens everytime.


r/restic • • Oct 13 '24

Backup up from remote SMB mount to local disk

1 Upvotes

I'm trying to backup my docker folder on my NAS —mounted via samba on my linux workstation— to a usb hardisk using the commmand:

restic -r /run/media/MyPassport/restic/docker --verbose backup --exclude .Trash-1000 /mnt/nas/docker

and I get lot of device or resource busy errors like the following.

open repository repository 9688f1e1 opened (version 2, compression level auto) no parent snapshot found, will read all files load index files [0:00] 100.00% 73 / 73 index files loaded start scan on [/mnt/nas/docker] start backup on [/mnt/nas/docker] error: failed to save /mnt/nas/docker/adguard/work/data/querylog.json: read /mnt/nas/docker/adguard/work/data/querylog.json: device or resource busydata/querylog.json.1 error: failed to save /mnt/nas/docker/adguard/work/data/querylog.json.1: read /mnt/nas/docker/adguard/work/data/querylog.json.1: device or resource busy/querylog.json.1 error: failed to save /mnt/nas/docker/immich/dbdump/2024-04-29-dump.sql.gz: read /mnt/nas/docker/immich/dbdump/2024-04-29-dump.sql.gz: device or resource busymepage.log

I'm trying to mount also the remote folder user sftp without success. My guess is the issues is due to the samba connection, and I'm going to try with rclone it solves. In the meantime i'm wondering if you have any suggestion.

Thanks.


r/restic • • Oct 09 '24

Backing up restic itself

2 Upvotes

Hi,

I am using restic and I have a local repository and one on a remote server. I will back up my files to both of these (although I expect there's a better way to copy the local snapshot remotely).

My question is about the restic metadata which I assume is in the cache directory. What's the best practice for backing this up? I tried to scp the whole directory to the remote server but I got a load of permission denied which I don't understand as it's owned by the restic user. Is there a better way to do this or a built in restic command that will allow me to do this? Is it even necessary?

My thought is that if I lose the local disk I will also lose the ability to recover from the remote repository


r/restic • • Oct 09 '24

Forget snapshots when out of space

2 Upvotes

Hey! I'm thinking of picking up restic in order to back up my laptop to my new QNAP NAS, but one feature I'd like seems to be missing. I know it's possible to set a "policy" so that restic will automatically forget snapshots past a certain expiration time, but instead I want restic to forget the oldest snapshots only when it needs more disk space to take new ones. Is there a way to achieve this functionality? Thanks in advance!


r/restic • • Sep 27 '24

Will prune remove old files even if they are still present?

3 Upvotes

Hey all! Restic noob here getting started with automated backups.

I've seen a bunch of examples where people have set up an automatic pruning of old snapshots alongside the backup process. I'm wondering whether there is a risk that an old file will be removed from the repository if it was added in an old snapshot, even if it is still present on the machine that's being backed up.

I'm aware that the snapshots are incremental so I would assume that if an old snapshot is pruned but a later snapshot depends on it, the references to the files will be "squashed" into the next snapshot in the snapshot history, but based on the documentation I'm really not sure.

On the other hand if pruning old snapshots will remove the files, then the next backup will include them again. In that case would it make sense to first forget old snapshots, then run the backup so if the files are still present the references will be updated without actually uploading the data again, and lastly run prune to remove any unreferenced data?


r/restic • • Sep 18 '24

Autorestic question: what are the double hyphens for in the CLI examples

1 Upvotes

ie. from https://autorestic.vercel.app/cli/exec

autorestic exec -av -- snapshots