Amanda-Users

Re: SV: Backup using ZFS snapshots on OpenSolaris

2008-10-02 10:00:28
Subject: Re: SV: Backup using ZFS snapshots on OpenSolaris
From: Nick Smith <nick.smith AT techop DOT ch>
To: "Gunnarsson, Gunnar" <Gunnar.Gunnarsson AT svk DOT se>
Date: Thu, 02 Oct 2008 15:53:52 +0200

Gunnarsson, Gunnar wrote:
Amanda backup user needs to run zfs snapshot/destroy, zfs allow -ldu 
AMANDA_USER mount,snapshot,destroy FILE SYSTEM is still a missing feature in 
any Solaris 10 Update that I know of. Workaround ?

thanks GG

Probably Solaris 10 Update 6 due out in approximately one month will
*probably* have ZFS rights delegation. The ZFS implementation included in OpenSolaris 2008.11 snapshots already have this feature.

In the mean time you can give the Amanda backup user the rights to manipulate ZFS filesystems by using the following command :

usermod -P "ZFS File System Management,ZFS Storage Management" <amanda-backup-user>

Then you will need to run all ZFS commands via pfsh or pfexec to get the profile assigned rights. I've attached a patch for amzfs-snapshot to do exactly this.

Regards,

Nick


-----Ursprungligt meddelande-----
Från: owner-amanda-users AT amanda DOT org [mailto:owner-amanda-users AT amanda DOT 
org] För Nick Smith
Skickat: den 1 oktober 2008 16:42
Till: amanda-users AT amanda DOT org
Ämne: Re: Backup using ZFS snapshots on OpenSolaris


Be aware that there isn't an offical beta (i.e. tagged versions) as yet
- it's a snapshot of the Amanda 2.6.1 *alpha* *development* SVN tree.

Having said that Amanda built from SVN HEAD works pretty well!

Q : Is anyone planning to backup ZFS volumes with Amanda?

Regards,

Nick Smith


54d53
< my $pfexec_path = 'pfexec';
163c162
<     my $cmd = "$pfexec_path $zfs_path get -H mountpoint $filesystem";
---
>     my $cmd = "$zfs_path get -H mountpoint $filesystem";
203c202
<     my $cmd = "$pfexec_path $zfs_path snapshot $filesystem\@$snapshot";
---
>     my $cmd = "$zfs_path snapshot $filesystem\@$snapshot";
230c229
<     my $cmd = "$pfexec_path $zfs_path destroy $filesystem\@$snapshot";
---
>     my $cmd = "$zfs_path destroy $filesystem\@$snapshot";