Re: Clients that return something else

2018-11-19 Thread J Chapman Flack
On 11/15/18 2:49 PM, Chris Hoogendyk wrote:
> This
> 
> is a bit dated, but may give you an idea of how to attack it. However,
> it could be that with the api work that Dustin did there is a better way
> of doing this with the newer versions of Amanda.

Yes, it sounded to me as if this was a question for the
Application / Script API. Amanda has very flexible support for
letting you write a script that can turn whatever-you've-got
into a stream of bytes in any way that makes sense, and turn a
stream of bytes back into whatever-it's-supposed-to-be, and Amanda
will use that for backups, and store the byte streams away, and
amrecover will fetch the bytes back and use your app/script to
turn them back into whatever-it's-supposed-to-be.

The API in the current released versions has a kind of steep
learning curve. There is an open pull request aimed at making it
much easier to use:  https://github.com/zmanda/amanda/pull/78

The pull request also includes several more example apps and
scripts, for things like backing up filesystems on LVM using
snapshots, making consistent hot backups of Subversion repositories
or 389 Directory Server instances, another approach to ZFS backups
where some other process is creating regular snapshots and Amanda
just works from those, etc. The examples should give a good sense
of what can be built when the API is easy enough to work with.

The docs for those examples are here:
https://github.com/zmanda/amanda/files/1265069/AppScriptWithAbstractClasses.pdf

-Chap


RE: Clients that return something else

2018-11-15 Thread Cuttler, Brian R (HEALTH)
I think if you want a disk image you want the native OS disk image utility, 
(file-system-type)dump. Dump, ufsdump, xfsdump, etc. Amanda supports this.

Do you ever need a disk image other than the boot volume? I realize some 
special applications may have file types that are not recognized for backup by 
tar, but that would be pretty rare.

From: owner-amanda-us...@amanda.org  On Behalf 
Of Chris Miller
Sent: Thursday, November 15, 2018 2:23 PM
To: amanda-users 
Subject: Re: Clients that return something else


ATTENTION: This email came from an external source. Do not open attachments or 
click on links from unknown senders or unexpected emails.

Hi Brian
From: "Cuttler, Brian R (HEALTH)" 
mailto:brian.cutt...@health.ny.gov>>
To: "Chris Miller" mailto:c...@tryx.org>>, "amanda-users" 
mailto:amanda-users@amanda.org>>
Sent: Thursday, November 15, 2018 10:54:49 AM
Subject: RE: Clients that return something else
Why pipe dd to tar when you can just run tar?
Good question. tar works at the filesystem level but dd works at the disk block 
level and I'm not aware of any way that tar can create a disk image, so I need 
to read the disk with dd. AMANDA expects a tar saveset, so I need to pipe 
anything I create to tar.



Er – I think the answer is “yes”, but you may have to roll your own.
Yeah, so do I. I'm just not exactly sure how I tell the client what to do. It 
appears that the dumptype uses something symbolic, and leaves the client up to 
its own devices to determine what it means. I could also do this, but I'd 
really like to be able to define the script on the server. Also, it's not 
exactly clear to me how the client understands what "GNUTAR" or "DUMP" means 
locally -- something must see "GNUTAR" and conclude, "Oh, he wants to run 
/usr/sbin/tar". For example, if I could put "BASH" in my dumptype definition 
for "program", and include that code somehow, that would be perfect! Ever hear 
of anything like that?

Thanks for the help, Brian.
--
Chris.

V:916.974.0424
F:916.974.0428


Re: Clients that return something else

2018-11-15 Thread Chris Hoogendyk
This <https://wiki.zmanda.com/index.php/Backup_client_(old)#Chris_Hoogendyk.27s_Example> is a bit 
dated, but may give you an idea of how to attack it. However, it could be that with the api work 
that Dustin did there is a better way of doing this with the newer versions of Amanda. I'm not on 
Solaris anymore, and I've updated most of my Amanda installations, so I haven't been using this 
wrapper for some time.



On 11/15/18 2:22 PM, Chris Miller wrote:

Hi Brian

*From: *"Cuttler, Brian R (HEALTH)" 
*To: *"Chris Miller" , "amanda-users" 

*Sent: *Thursday, November 15, 2018 10:54:49 AM
    *Subject: *RE: Clients that return something else

Why pipe dd to tar when you can just run tar?

Good question. tar works at the filesystem level but dd works at the disk block level and I'm not 
aware of any way that tar can create a disk image, so I need to read the disk with dd. AMANDA 
expects a tar saveset, so I need to pipe anything I create to tar.




Er – I think the answer is “yes”, but you may have to roll your own.

Yeah, so do I. I'm just not exactly sure how I tell the client what to do. It appears that the 
dumptype uses something symbolic, and leaves the client up to its own devices to determine what it 
means. I could also do this, but I'd really like to be able to define the script on the server. 
Also, it's not exactly clear to me how the client understands what "GNUTAR" or "DUMP" means 
locally -- something must see "GNUTAR" and conclude, "Oh, he wants to run /usr/sbin/tar". For 
example, if I could put "BASH" in my dumptype definition for "program", and include that code 
somehow, that would be perfect! Ever hear of anything like that?


Thanks for the help, Brian.
--
Chris.

V:916.974.0424
F:916.974.0428


--
---

Chris Hoogendyk

-
   O__   Systems Administrator
  c/ /'_ --- Biology & Geosciences Departments
 (*) \(*) -- 315 Morrill Science Center
~~ - University of Massachusetts, Amherst



---

Erdös 4



Re: Clients that return something else

2018-11-15 Thread Debra S Baddorf



> On Nov 15, 2018, at 1:22 PM, Chris Miller  wrote:
> 
> Hi Brian
> From: "Cuttler, Brian R (HEALTH)" 
> To: "Chris Miller" , "amanda-users" 
> Sent: Thursday, November 15, 2018 10:54:49 AM
> Subject: RE: Clients that return something else
> Why pipe dd to tar when you can just run tar?
> Good question. tar works at the filesystem level but dd works at the disk 
> block level and I'm not aware of any way that tar can create a disk image, so 
> I need to read the disk with dd. AMANDA expects a tar saveset, so I need to 
> pipe anything I create to tar.
> 
> 
> 
> Er – I think the answer is “yes”, but you may have to roll your own.
> Yeah, so do I. I'm just not exactly sure how I tell the client what to do. It 
> appears that the dumptype uses something symbolic, and leaves the client up 
> to its own devices to determine what it means. I could also do this, but I'd 
> really like to be able to define the script on the server. Also, it's not 
> exactly clear to me how the client understands what "GNUTAR" or "DUMP" means 
> locally -- something must see "GNUTAR" and conclude, "Oh, he wants to run 
> /usr/sbin/tar". For example, if I could put "BASH" in my dumptype definition 
> for "program", and include that code somehow, that would be perfect! Ever 
> hear of anything like that?
> 
> Thanks for the help, Brian.
> --
> Chris.

Well, you do have to point amanda to tar  and also to dump,  when you compile 
amanda.
Just yesterday had to recompile amanda, since dump and restore had been 
installed AFTER
the first compilation. And there’s a flag you use to point to tar.

This would be on each client.

Deb Baddorf




Re: Clients that return something else

2018-11-15 Thread Chris Miller
Hi Brian 

> From: "Cuttler, Brian R (HEALTH)" 
> To: "Chris Miller" , "amanda-users" 
> Sent: Thursday, November 15, 2018 10:54:49 AM
> Subject: RE: Clients that return something else
> Why pipe dd to tar when you can just run tar?

Good question. tar works at the filesystem level but dd works at the disk block 
level and I'm not aware of any way that tar can create a disk image, so I need 
to read the disk with dd. AMANDA expects a tar saveset, so I need to pipe 
anything I create to tar. 

> Er – I think the answer is “yes”, but you may have to roll your own.

Yeah, so do I. I'm just not exactly sure how I tell the client what to do. It 
appears that the dumptype uses something symbolic, and leaves the client up to 
its own devices to determine what it means. I could also do this, but I'd 
really like to be able to define the script on the server. Also, it's not 
exactly clear to me how the client understands what "GNUTAR" or "DUMP" means 
locally -- something must see "GNUTAR" and conclude, "Oh, he wants to run 
/usr/sbin/tar". For example, if I could put "BASH" in my dumptype definition 
for "program", and include that code somehow, that would be perfect! Ever hear 
of anything like that? 

Thanks for the help, Brian. 
-- 
Chris. 

V:916.974.0424 
F:916.974.0428