Amanda-Users

Re: globbing

2009-10-20 12:20:50
Subject: Re: globbing
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: Brian Cuttler <brian AT wadsworth DOT org>
Date: Tue, 20 Oct 2009 12:05:58 -0400
That's what I wanted to see,

For the disklist:
 finsen  /export/home-A /export/home
it create a 'amanda-_export_home-current' snapshot, this is bogus, the snapshot should be 'amanda-_export_home-A-current'.

Try the attached patch.

Jean-Louis

Brian Cuttler wrote:
Jean-Louis,

On Tue, Oct 20, 2009 at 11:50:34AM -0400, Jean-Louis Martineau wrote:
It create one snapshot for each DLE.

Yes, however I'm afraid that if it creates a single disklist
for a glob, for instance /export/home/a*, creates snapshot /export/home
which I think would be acceptable.

But 'attempts' to create the same snapshot for glob /export/home/b*
and /export/home/c* those # zfs create snapshots will fail, which
may not actually be a problem.

However, when any of those globs completes and attempts to remove
the snapshot -- what will happen to the remaining dumps. They will
all lose their snapshots! (I think.)

I was hoping to have a snapshot for each of the directories within
the glob /export/home/a* which will work (on my system) since each
of the user directories is itself a mount point.

I recognize that there is no way to snapshot all of the As and then
all of the Bs.

I don't think there is a mechanism to maintain 'the' snapshot
until all of the globs complete. There is no cross-glob coordination.

Can you post the disklist file so I can interpret the debug file correctly.

The disklist posted differs only in that for the -A glob we ran with
zfs-snapshot rather than user-tar.

                                                thank you,

                                                Brian

Jean-Louis

Brian Cuttler wrote:
Jean-Louis,

>From directory (on the client) /tmp/amanda/client
[finsen/tmp/amanda/client] pwd
/tmp/amanda/client

[finsen/tmp/amanda/client] tar -cf /tmp/amzfs-snapshots.tar Amzfs_snapshot.20091019*




On Tue, Oct 20, 2009 at 11:21:55AM -0400, Jean-Louis Martineau wrote:
Brian,

What is the path of the snapshot, post the Amzfs_snapshot.20091019*.debug files.

Jean-Louis

Brian Cuttler wrote:
Jean-Louis,

I reconfigured one of my globs to use dumptype zfs-snapshot
rather than user-tar. Backups ran well but I believe that we
did a single snapshot of /export/home rather than a snapshot
of /export/home/a* for each of the 'a' directories.

I think this because when I look on the client system in the
/tmp/amanda/client directory, at the Amzfs_snapshot.20091019*.debug
files I see sepatate zfs snapshots for things like /export/samba/<shares>
but only the single snapshot for /export/home and not unique snapshots
for
[finsen/tmp/amanda/client] cd /export/home
[finsen/export/home] ls -ld a*
drwxr-xr-x   2 agaupel  users          4 Aug 25 09:46 agaupel
drwxr-xr-x   2 along    users          4 Sep 11 13:37 along
drwxr-xr-x   5 amanda   sys           12 Sep 24 13:46 amanda
drwxrwxr-x   2 daver    root           3 Aug 27 15:44 amandaScript
drwxr-xr-x   2 anarmand users          4 Sep 23 09:37 anarmand
drwxr-xr-x   2 aroselan users          4 Oct 15 10:46 aroselan

While this may work fine for a limited number of a* directories
I'm afraid of what will happen if I again try to produce a
snapshot for the b* directories.

It may be that the snapshot create fails after the first successfull
attempt, but what happens when the first glob completes dumping and
attempts to remove the snapshot ?

I will revert that glob to user-tar dumptype for the time being.

                                                thank you,

                                                Brian

---
  Brian R Cuttler                 brian.cuttler AT wadsworth DOT org
  Computer Systems Support        (v) 518 486-1697
  Wadsworth Center                (f) 518 473-6384
  NYS Department of Health        Help Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
>from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.

---
   Brian R Cuttler                 brian.cuttler AT wadsworth DOT org
   Computer Systems Support        (v) 518 486-1697
   Wadsworth Center                (f) 518 473-6384
   NYS Department of Health        Help Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.



Index: perl/Amanda/Application/Zfs.pm
===================================================================
--- perl/Amanda/Application/Zfs.pm      (revision 2187)
+++ perl/Amanda/Application/Zfs.pm      (working copy)
@@ -385,12 +385,12 @@
     my $snapshotname = "";
 
     if (!defined $level) {
-      $snapshotname = "amanda-" . Amanda::Util::sanitise_filename($device) . 
"-current";
+      $snapshotname = "amanda-" . 
Amanda::Util::sanitise_filename($self->{disk}) . "-current";
     } else {
       if ($level < 0) {
-       $snapshotname = "amanda-" . Amanda::Util::sanitise_filename($device) . 
"-check";
+       $snapshotname = "amanda-" . 
Amanda::Util::sanitise_filename($self->{disk}) . "-check";
       } else {
-        $snapshotname = "amanda-" . Amanda::Util::sanitise_filename($device) . 
"-" . $level;
+        $snapshotname = "amanda-" . 
Amanda::Util::sanitise_filename($self->{disk}) . "-" . $level;
       }
     } 
 
<Prev in Thread] Current Thread [Next in Thread>