Skip to main content

Duplicity MediaFire backend is merged

My lp:rye/duplicity/mediafire branch was merged. And this means that MediaFire backend will be available for general public when the next duplicity version is released.

I had to change a couple of things in order for it to be accepted, so here's how to use the new built-in mediafire backend.

All the warnings from my original article still stand, so read that first before you sign up for the service.

First, install the mediafire library:

pip install 'mediafire>=0.5.2'

0.5.2 is the latest release as of now. If you use pip, you'll get the latest version.

Define your password in FTP_PASSWORD variable. Yep, I know, it's counter-intuitive, but that variable is used by multiple backends already and having the new backend playing well with others is also important:

export FTP_PASSWORD=your-mediafire-password

Set the remote URL as: mf://your-email%40example.com@mediafire.com/path/to/folder.

Frankly speaking, it does not matter what domain you are using as the mf protocol handler will kick in, but the parser is really really interested to have a fully qualified domain. Try mf://email%40example.com@mfi.re/path/to/folder to save some keystrokes. Your email must be URL-encoded.

Well, that's really it.

$ duplicity /home/rye/tmp/duplicity/ mf://you%40example.com@mfi.re/example/backup/folder
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
--------------[ Backup Statistics ]--------------
StartTime 1456269323.53 (Tue Feb 23 18:15:23 2016)
EndTime 1456269323.61 (Tue Feb 23 18:15:23 2016)
ElapsedTime 0.08 (0.08 seconds)
SourceFiles 4
SourceFileSize 170670 (167 KB)
NewFiles 4
NewFileSize 170670 (167 KB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 4
RawDeltaSize 166574 (163 KB)
TotalDestinationSizeChange 163532 (160 KB)
Errors 0
-------------------------------------------------

$ duplicity mf://you%40example.com@mfi.re/example/backup/folder /home/rye/tmp/duplicity-restore
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Tue Feb 23 18:15:20 2016

Troubleshooting

Giving up after 5 attempts. ResourceNotFoundError: dacbycydqeaf2

The server-side is known to return 500 Internal server errors at times and the way MediaFire authenticates the request may prevent subsequent retries from succeeding. So if you start getting an error such as ResourceNotFound:. 'aabbccddeeff', that may mean the flow is corrupted and renegotiation is required. This is related to Handle "127: The signature you specified is invalid" error bug report.

So generally, if you see that duplicity failed due to backend error, your best bet is to try running it again.

Reporting bugs

Use lp:duplicity bug tracker and make sure you specify the version of duplicity as well as mediafire library version.

Comments

Comments powered by Disqus