Connecting to Minio via custom URL


#1

I have Minio (locak S3 clone service) setup on my server and would like to be able to use it as my backup destination.

I have read through how to setup a custom URL and think I have it set correctly, but wonder if non-default ports are supported? I have minio running on port 9000. Here is what I have tried:

 "TargetURL": "s3://test/foo?s3-server-name=192.168.1.107%3A9000&s3-location-constraint=&s3-storage-class=&auth-username=dpeart&auth-password=password",

I have a bucket test created, but not the directory foo.

Test connection can’t complete name resolution.

suggestions?

thanks
david


Easiest storage backend to setup/install
#2

Hi,

Same here. Duplicati + minio = perfect solution to replace crashplan
But I get the name resolution message too.
I tried with IP and name.

We are not alone ™


#3

Could you explain what is so good about this setup?


#4

It replaces one important features of crashplan --> Backup to a friend drive
Duplicati could already do this using FTP, webdav, … But it’s more complicated. For FTP ou need to open 2 ports, create a user,… Webdav is also available but depending on the server you have to edit a config file…
With minio, it’s simpler. There is only one binary file. only one port, no config file to edit for a simple usage and the only command is:
"minio server C:\storage_dir"
That’s all you have to know. Then just copy paste de API key.

Issue is to create a service under windows or linux to start it.
You could bundle minio with duplicati to create a perfect crashplan replacement.


#5

Amazon’s version of S3 uses DNS to locate the server(s) handling the buckets. You need to disable this feature by adding --s3-ext-forcepathstyle=true.

Your URL then becomes:

s3://test/foo?s3-server-name=192.168.1.107%3A9000&s3-location-constraint=&s3-storage-class=&auth-username=dpeart&auth-password=password&s3-ext-forcepathstyle=true

#6

I’m using the web interface so I added the advanced option "s3-ext-forcepathstyle"
And… it works. Thanks


#7

In the latest canary build I have added a check that sets this option automatically if the server url is not a known Amazon S3 endpoint. The advanced option --s3-ext-forcepathstyle can still override this automatic setting, but it should now work without setting it.


#8

Crashplan/minio would be nice, but port forwarding would still need be an issue I think. Most people are behind firewalls.

What I also very much like about minio are its data protection features.


#9

I’m having this exact problem with Duplicati and minio on my local LAN. I went so far as to export the command line so I could turn on debug output, in case that revealed something further.

I know that minio is working, as I can copy files using their client from the same computer I’m attempting to test Duplicati on.

The URL generated by the WebUI looked like this when exported:
"s3://randomusername-bigdummy//Users/nmiller/?s3-server-name=s3%3A%2F%2F192.168.10.9%3A9000%2F&s3-location-constraint=&s3-storage-class=&auth-username=randomusername&auth-password=really-long-password-here&s3-ext-forcepathstyle=true"

I see Issue 2350 has had two other people report this problem, but the bug was not reopened.

System details:
Version name: "2.0.2.1_beta_2017-08-01" (2.0.2.1) Current Version folder /Applications/Duplicati.app/Contents/Resources OS: Unix 16.7.0.0 Uname: Darwin bigdummy.local 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64 64bit: True (True) Machinename: bigdummy.local Processors: 4 .Net Version: 4.0.30319.42000 Mono: True (5.0.1.1) (5.0.1.1 (2017-02/5077205 Wed May 31 14:47:04 BST 2017)) Locale: en-US, en-US, en-US Date/time strings: dddd, MMMM d, yyyy - h:mm:ss tt Tempdir: /var/folders/x4/ynvvg9pn7r3_n_576cbbs93r0000gp/T/ Environment variable: TMPDIR = /var/folders/x4/ynvvg9pn7r3_n_576cbbs93r0000gp/T/ SQLite: 3.16.0 - Mono.Data.Sqlite.SqliteConnection SQLite assembly: /usr/local/Cellar/mono/5.0.1.1/lib/mono/gac/Mono.Data.Sqlite/4.0.0.0__0738eb9f132ed756/Mono.Data.Sqlite.dll

I have the sqlite log database as well.


#10

The errors mentioned in that issue were name resolution errors (i.e. randomusername-bigdummy is not recognized as a hostname.

If you have the same error, you might have to use the server IP.
If you know how to set it up, you can also make sure that the hostname resolves to the correct IP.


#11

I appreciate the reply. I actually tried by IP address as you can see in my command line–I do not have internal DNS set up on my home network.

I’m using the exact same version this time, but I didn’t allow Duplicati to add a username to the bucket. And this time, Duplicati was able to connect and back up a test directory.

However, it seems that the command line exporter works inconsistently. As you see above, in my original post, it URL encoded the colon before the port number as “%3A” in the S3 URL, and also added other URL encoded characters. This time (same version of Duplicati), when I exported the command line, it didn’t even include the port number, but the other extra path elements and URL encodings didn’t occur:

"/Applications/Duplicati.app/Contents/Resources/Duplicati.CommandLine.exe" backup "s3://test1/?s3-server-name=192.168.10.9&s3-location-constraint=&s3-storage-class=&auth-username=D1WZPO4DKB83KW54J945&auth-password=2%2BitT2SYtPW8yPbszyJRBwUpoKRUY7wwJLXcjS9U&s3-ext-forcepathstyle=true"

As a further test, I added the port number without URL encoding to the command line version, and the test backup worked from the terminal.

I went back to the WebUI to edit the test backup to add further directories. When I went to the page with the custom URL the port was missing. Correcting this caused the next run to fail, and exporting the command line again showed the URL encodings and other oddities.

I can only surmise that editing an existing configuration does not working correctly. At least this can be worked around.

My personal preference would be to use plain text configuration files, but I’m probably an outlier on that point.


Minio S3 Object Name Errors
#12

Is it in plan to add Minio support this way will be simpler?


#13

Since Duplicati already supports Minio as a destination I don’t understand what sort of support you are asking about.


#14

Minio could be much easier configured as target if there was a preset in the UI. All it needs is IP, Port, AccessKey, SecretKey, Password and bucket name.


#15

It’s been a while since I test Minio with Duplicati, but are you saying you think having a “Minio” specific selection would be easier than using “S3 Compatible” (as described near the end of this post Setting up self-hosted Minio on Windows 10 with automatically renewing SSL certificate)?


#16

+1 for minio preset

Alternatively rclone with minio can be setup the same.