Amanda-Users

Re: Can you use an FTP Server for your tape device?

2009-03-25 13:06:20
Subject: Re: Can you use an FTP Server for your tape device?
From: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
To: mlb AT imparisystems DOT com
Date: Wed, 25 Mar 2009 12:52:25 -0400
On Wed, Mar 25, 2009 at 12:16 PM, Matt Burkhardt <mlb AT imparisystems DOT com> 
wrote:
> I was just wondering if it's possible to use an FTP server as your backup
> tape device - sort of like S3.  I've seen "Adding an FTP device" on the
> wiki, but didn't know if it made it in.

Nope, not yet.

> If it's not in there - what would I start looking at to make it possible?

This would have made a *great* Google Summer of Code project!  Sadly,
the window for projects to submit proposals closed a few weeks ago,
and the program is now soliciting applications from potential interns.

It would involve writing a new Amanda device.  The device would be a
lot like the existing S3 device.  In fact, I believe libcurl supports
FTP, so you may not even need to add any new dependencies.  The Device
API, because it deals in raw data, is in C (only the higher-level
components of Amanda are being rewritten in Perl).

I would start by looking at the device API in general, and getting
introduced to GObject and its mechanism for calling object methods.
Then you should look at the S3 device to see how it implements the
various operations a device requires.  In particular, you'll want to
look at how it stores tape and file labels and individual blocks using
different filenames, as well as the mechanisms it uses to translate
filename listings into the information the device requires
(s3_list_keys).  You should also have a look at the property
interface, whereby the S3 device gets its authentication information
and exposes a few other minor knobs.

Next, you would think about how to implement all of this over FTP.  I
expect that the uploads and downloads would be fairly straightforward,
but the file-listing might be hard: as I understand it, there's not a
standard format for file listings on FTP servers.  Then you'd look for
support in libcurl or select some other FTP library, and start coding!

This is a *great* way to learn about the Device API.  I expect that
this feature will be of interest to some others, so some sharing of
the burden may be possible.  I (and Nikolas and Jean-Louis, I'm sure)
stand ready to help you out as much as possible.

Dustin

-- 
Storage Software Engineer
http://www.zmanda.com

<Prev in Thread] Current Thread [Next in Thread>