Add gio backend

Bug #383419 reported by Michael Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

It would be nice if duplicity had a gio backend. That way it could accept any gio-supported schema and wouldn't have to worry about a lot of common server types. Or at least, gio-capable apps (like deja-dup) could pass them along.

In theory this means you could abandon the temperamental ssh and ftp backends (and webdav), but from my experience with your userbase, they would not want gio (and thus glib) to be used by default.

Since gio has its own set of schemas, it makes sense to trigger the gio backend not with a schema, but with a command line switch like --gio. Then the gio backend would be forced on, regardless of schema. The URL would then be passed on to the backend.

I'm partway through this work. Let me know if you see any major problems with the idea before I finish it! :)

Michael Terry (mterry)
Changed in duplicity:
assignee: nobody → Michael Terry (mterry)
status: New → In Progress
Revision history for this message
Michael Terry (mterry) wrote :

Oh yeah, and gio probably requires the use of dbus, so it may not be very suitable for the general use case of running in a cron job. But it's still valuable for me and other use cases.

Revision history for this message
Michael Terry (mterry) wrote :

OK, here's the patch. Ignore my 'not suitable for cron' statement. I added code to start a session dbus if one isn't available, so everything works out.

This backend requires the use of the glib and gio python modules as well as the use of dbus. But it's not loaded by default. Only if the --gio argument is passed on the command line.

I've added tests for it and man and --help entries.

Changed in duplicity:
assignee: Michael Terry (mterry) → nobody
status: In Progress → Confirmed
Revision history for this message
Michael Terry (mterry) wrote :

Whoops, here's an ever-so-slightly better one that doesn't use the wrong exception class in a couple 'except' statements.

Michael Terry (mterry)
Changed in duplicity:
status: Confirmed → Fix Committed
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Do we have any documentation on what GIO schema's look like?

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.6.1
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

Uh, no, actually. Couldn't find any easy stuff. The URIs all look the same:

schema://username@server/path

But I'm not sure of the list of schemas. Not all backends have the same features. Like they have an http:// schema, but you can't write to it. They have some goofy ones too, like gphoto2:// for talking to cameras. I couldn't find a concise list of schemas and what they supported...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.