Creating a Restic backup _of_ a S3 bucket

Hi Restic users (and developers)!

I’ve been using Restic for a while and my backup process is completely restic-based. Recently I’ve created a S3 storage bucket managed and offered by my hosting provider. Now I’d like to include that S3 bucket into my Restic backup, since my provider does not offer backups on their side.

My plan was to mount my bucket locally using rclone:

rclone mount --daemon hetzner-s3:mybucket /mnt/hetzner-s3/mybucket

… and then just let Restic pick up the files from there and save them to my backup space:

restic backup /mnt/hetzner-s3/mybucket

… but unfortunately there seems to be something wrong with it, because receive errors like this:

error: NodeFromFileInfo: xattr.list /mnt/hetzner-s3/7de24bcbedb9b634.jpg: input/output error

A quick Google search revealed that the cause of the problem might be missing file attributes that rclone simply is not able to provide. Is there a workaround to this? Or maybe another recommended solution?

Sure, I could just get another S3 bucket and do a nightly “copy” from one bucket to the other. But that’s not really a way to keep fully versioned backups from the past days and weeks - and it’s not well intergrated with my existing Restic-based backup approach :S

1 Like

I doubt that this is the case. restic should ignore missing attributes. It has been fixed long time ago.

In addition this is exactly what I am doing (backing up rclone mount) and it works without any issues.

For the start make sure that you are using the latest restic and rclone. Do not rely on versions provided by you OS package manager. In some popular distros these versions are terribly outdated (many years old).

1 Like

Thanks for your quick reply to my issue!

I’ve updated Restic from 0.14 to 0.18 but unfortunately the behavior has not changed :S I’m still getting the same errors. restic version shows the expected version number. Maybe this problem is related to the particular implementation of S3? I’m using Hetzner S3. It’s said to be Amazon S3 compatible.

Do you use any special flags with restic or rclone?

1 Like

Make sure that you are using it:) If in doubt uninstall/delete old restic version.

Nope. Vanilla rclone mount command. The same as yours.

Should not matter. Is your rclone up to date? Is your mount working? - e.g. can you open /mnt/hetzner-s3/7de24bcbedb9b634.jpg file?

What is your rclone config? Post output of rclone config redacted hetzner-s3:

But we can always test it - if you want you can create some test bucket with not sensitive data and send me bucket access keys on priv. Then I can try it.

1 Like

I’ve updated my version of rclone and updating from 1.60 to 1.71 seems to resolve this issue :heart_eyes:. Thank you so much for leading me into the right direction!

(backup process is quite slow, but it works!)

1 Like

Both rclone v1.60 and and restic v0.14 are from 2022… ancient in IT terms:)

1 Like