duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] RFC: MediaFire backend


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] RFC: MediaFire backend
Date: Thu, 21 Jan 2016 06:34:28 -0600

Sorry for taking so long to get back to you.  To submit this for merge:
  1. Fix the logging to match others.  Look at other backends for examples, also see duplicity/log.py.
  2. Add the appropriate sections to the man page and commandline.py:usage() for user help.
  3. Finally, submit it for merging.  "Propose for merging" on the branch page.

On Wed, Jan 13, 2016 at 8:09 PM, Roman Yepishev <address@hidden> wrote:
Hi all,

I would like to submit my MediaFire duplicity backend for review and
comments. Please note that I am not affiliated with MediaFire and got
involved with backend development just because I thought "why not?"[0].

Branch: lp:~rye/duplicity/mediafire
File: http://bazaar.launchpad.net/~rye/duplicity/mediafire/view/head:/d
uplicity/backends/mediafirebackend.py


MediaFire is an online storage and collaboration company. Current
offering includes free plan that starts with 10GB, and a Pro plan which
offers 1TB of space for $4.99/mo (or $3.79/mo if billed annually).

This backend uses mediafire[1] library also developed by me
(GitHub[2]), so all of the upload complexity is hidden.

The code depends on the environment variables - MEDIAFIRE_EMAIL and
MEDIAFIRE_PASSWORD. Currently the service does not provide a reliable
way of supplying pre-authenticated tokens.

Not all of the uploads complete successfully - the server side may fail
to respond or the upload may fail for an unspecified reason. The client
attempts to retry failed uploads, as well as using the @retry decorator
from duplicity itself.

The client also can produce pretty verbose logs of the HTTP session, so
the backend attempts to configure the logging according to duplicity
log level. Unfortunately, I found no way to re-use the handler from
duplicity itself, so the log output will go to stderr. This may be an
overkill, and no other backend seems to do any logging configuration
for the underlying library.

Please note that MediaFire does not encrypt the files on the server-
side (so always encrypt the backups), and regular downloads currently
use HTTP connection by default. The client overrides the links and uses
HTTPS connections exclusively.

To test the backend:

1. Sign up - https://mfi.re/?g226qu3 for the free plan (or use https://
www.mediafire.com if you dislike referral links)

2. Install mediafire library (add --user for per-user install):

   pip install 'mediafire>=0.5.1'

3. Plant the mediafirebackend.py file into the backends directory of
duplicity installation.

4. Define the environment variables MEDIAFIRE_EMAIL and
MEDIAFIRE_PASSWORD with your credentials. Also set PASSPHRASE if there
is any sensitive information or use --encrypt-key.

5. Run:

   duplicity full /some/path mf:///duplicity

6. Observe the files being uploaded to "duplicity" folder in your
MediaFire account.


[0]: http://www.keypressure.com/blog/mediafire-duplicity-backup/
[1]: https://pypi.python.org/pypi/mediafire/
[2]: https://github.com/MediaFire/mediafire-python-open-sdk
[3]: https://mfi.re/?g226qu3

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]