Unable to back up to iDrive e2 (s3 compatible)

Hello,
I am unable to backup to idrive e2 (S3 compatible). Backups to a local drive work fine. Ubuntu 22, restic version 0.12.1 i think (im away from my file server currently)
Following idrive’s guide, there are clear errors.Integrate Restic with IDrive® e2
-they have you secure the environmental variables as read only to root. They do not specify you must then run restic as root, but I switched to root to continue.
-I struggled for a while with having the password in an environmental variables, and it repeatedly failed. This ended up being due to my password beginning with an unalowed character.
-After fixing the password issue, it continued to fail, until I added: AWS_DEFAULT_REGION=“Dallas”. Idrive tutorial does not state this, but I figured it out by trial and error. With this set to “Dallas” OR “us-da”, the restic backup can be initiated. Idrive lists “Dallas” as the region, but I found elsewhere that “us-da” is a valid AWS region for the S3 protocol. It is not clear why both of these regions allows it to work. Restic writes the initial config files to the remote idrive bucket as expected.
However, any backup attempt or attempt to check the snapshots fails: “Fatal - password error” or similar.
Any ideas what could be the issue?

start with installing the latest restic version. You are using ancient one from 2021.

Uninstall one provided by your repo and install one directly from restic website.

Then run all again and if things do not work answer all questions you were asked when opening this thread.

Is not very useful. Be precise and report exactly what you are doing and what you are seeing.

Restic initiates the backup without issue, after asking for a password. there are files created on the remote idrive bucket.

Then, immediately after, trying to backup, with the same password, if fails.

restic 0.18.0 compiled with go1.24.1 on linux/amd64

sourced env:

export AWS_DEFAULT_REGION=“Dallas”
export RESTIC_REPOSITORY=“s3:``https://THEIDRIVELOCATIONANDBUCKET``”
export AWS_ACCESS_KEY_ID=“THEKEY”
export AWS_SECRET_ACCESS_KEY=“THESECRETKEY”

the terminal commands

root@filebuntu:/etc# source /etc/restic-env
root@filebuntu:/etc# restic -r “$RESTIC_REPOSITORY” init
enter password for new repository:
enter password again:
created restic repository dbfc54d7b6 at s3:https://THEIDRIVELOCATIONANDBUCKET
Please note that knowledge of your password is required to accessthe repository. Losing your password means that your data isirrecoverably lost.

root@filebuntu:/etc# restic -r $RESTIC_REPOSITORY backup /home/LOCATION/

enter password for repository:wrong password or no key found. Try againenter password for repository:wrong password or no key found. Try againenter password for repository:Fatal: an empty password is not allowed by default. Pass the flag --insecure-no-password to restic to disable this check

One small thing, I notice you’re not quoting $RESTIC_REPOSITORY in your backup command, but you are in your init command. It also looks like something is going wrong when entering the password during the second command, possibly as a result of this.

Also, you don’t need to specify the repository location with -r if you already set it using the environment variable. Backing up — restic 0.18.0 documentation

hello @aminer2k i have quoted only the error above.
restic complaints twice about a wrong password and once about an empty one.

if you search for “wrong password or no key found” on the forum there are many topics with some suggestions. These two I would recommend for you now:

  1. can you look in the iDrive bucket if the Keys folder exists with a file in it?
  2. can you verify the bucket URL has to be Virtual-hosted–style or Path-style?

iDriveE2 S3 is really a plain S3 provider. I have been using them for long and never encountered any issues with restic nor other programs using their S3 API.

This is most likely your problem and you incorrectly specify url and bucket names. Also your quoting looks weird. But it might be needed for your shell. Hard to tell with you obscuring details (which in this case are public anyway - but your bucket name)

Here you are working example with my iDrive account:


$ export AWS_ACCESS_KEY_ID="XXX"
$ export AWS_SECRET_ACCESS_KEY="XXX"

$ export RESTIC_REPOSITORY="s3:https://p7v1.ldn.idrivee2-40.com/test"
# where "test" is my bucket name

$ export RESTIC_PASSWORD="password"


$ restic init
created restic repository 59d644035a at s3:https://p7v1.ldn.idrivee2-40.com/test

Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.


$ restic backup .
repository 59d64403 opened (version 2, compression level auto)
created new cache in /Users/kptsky/Library/Caches/restic
no parent snapshot found, will read all files
[0:00]          0 index files loaded

Files:           6 new,     0 changed,     0 unmodified
Dirs:            6 new,     0 changed,     0 unmodified
Added to the repository: 5.118 KiB (2.741 KiB stored)

processed 6 files, 0 B in 0:01
snapshot edb47682 saved


$ restic list snapshots
repository 59d64403 opened (version 2, compression level auto)
edb47682c8b463922b3659653b2bf52b1a42efe2f1e009a6afd6bd57e22b09aa

Your S3 URL might be different - check in iDrive web console.

Do not use “weird” characters in your repo password. It can cause issues when not exported correctly - some characters might need escaping in your system. If in doubt just use alphanumeric password only. This simple practice saved my bacon many times.

If you are paranoid just make it longer. You need 25 case-sensitive alphanumeric characters for 128 bits entropy - which is enough to secure top secrets government documents in US:)

EDIT:

Not that it is critical but here you are more precise maths:

1 Like

SOLVED!

Thank you all. Based on all the responses, I went through it line by line again.

Specifying the location was a dead end. The backup initializes if I specify the aws location, but not if I remove it. This is unrelated to the real problem.

The problem is THE ENDPOINT SHOWN BY IDRIVE DOES NOT WORK. They show for my bucket:

Endpoint: lnc-restic.u5y7.da.idrivee2-35.com

Using this fails. Using this, but adding the name of the bucket /lnc-restic at the end fails to backup also.

The actual endpoint to use is not the endpoint given by idrive. It should be:

Endpoint: u5y7.da.idrivee2-35.com/lnc-restic

This works. Don’t use the endpoint they give you, remove the first part of the URL, and make sure to add the name of the bucket at the end.

1 Like

The problem was between chair and keyboard:) and it took so long to solve because you unnecessary obscured key part of info.

Restic documentation is very clear what S3 endpoint format you should use:

restic expects path-style URLs like for example s3.us-west-2.amazonaws.com/bucket_name for Amazon S3. Virtual-hosted–style URLs like bucket_name.s3.us-west-2.amazonaws.com, where the bucket name is part of the hostname are not supported. These must be converted to path-style URLs instead, for example s3.us-west-2.amazonaws.com/bucket_name. See below for configuration options for S3-compatible storage from other providers.

A few minutes documentation reading often saves hours of troubleshooting.

1 Like