Results 1 to 5 of 5

Thread: Amanda 3.3.9 ZFS on Linux incremental backup problem

  1. #1
    Join Date
    Mar 2015
    Posts
    9

    Default Amanda 3.3.9 ZFS on Linux incremental backup problem

    Hello,

    I have a problem with incremental backup on ZoL (ZFS on Linux) with amzfs-snapshot.
    It's look like incremental level 1 is same as level 0.
    amreport:
    Code:
    DUMP SUMMARY:
                                                                                DUMPER STATS   TAPER STATS
    HOSTNAME     DISK                                 L ORIG-MB  OUT-MB  COMP%  MMM:SS   KB/s MMM:SS   KB/s
    --------------------------------------------------- ---------------------- -------------- -------------
    xxxx      tank/gentoo/root                     1    3944    1460   37.0    5:03 4937.5   5:32 4503.7
    xxxx      tank/gentoo/usr                      1    4103    1728   42.1    6:31 4529.1   6:31 4524.9
    xxxx      tank/gentoo/var                      1    2529    1128   44.6    3:37 5321.4   4:15 4528.0
    zfs list -o space:
    Code:
    NAME                                  AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
    tank/gentoo/root                       178G  2.00G     1.75M   1.99G              0          0
    tank/gentoo/usr                        178G  3.98G      565K   3.98G              0          0
    tank/gentoo/var                        178G  1.72G      193M   1.53G              0       437K
    I found something in google to set two property in my amanda.conf:
    Code:
    ...
    define application-tool app_amgtar {
        comment "amgtar"
        plugin  "amgtar"
        property "CHECK-DEVICE" "NO"
        property "ATIME-PRESERVE" "NO"
    }
    define script-tool amzfs_snapshot {
       comment "backup of zfs snapshot"
       plugin  "amzfs-snapshot"
       execute-on  pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup
       execute-where client
       property "DF-PATH" "/bin/df"
       property "ZFS-PATH" "/sbin/zfs"
       #property "PFEXEC-PATH" "/usr/sbin/pfexec"
       property "PFEXEC" "NO"
    }
    define dumptype zfs-comp-amgtar {
      auth "local"
      program "APPLICATION"
      application "app_amgtar"
      script "amzfs_snapshot"
      compress none
      encrypt client
      client_encrypt "/usr/sbin/amgpgcrypt"
      client_decrypt_option "-d"
      index
    }
    any suggestion ?

    I use amanda on all my servers but this is first with ZFS... others use LVM and works fine.

  2. #2
    Join Date
    Mar 2015
    Posts
    9

    Default

    Now i found the problem is in tar or zfs.
    http://pastebin.com/AgmkjNPY

  3. #3
    Join Date
    Mar 2015
    Posts
    9

    Default

    OK I think the problem is in ZFS On Linux. I created Issue on github https://github.com/zfsonlinux/zfs/issues/4968

    There are is some workaround?

    Tar always show me information "tar: .: Directory has been renamed" ... ca I somehow ignore the "dot" directory ?

  4. #4
    Join Date
    Mar 2015
    Posts
    9

    Default

    OK I make some workaround.
    Unfortunately is must be a patch to tar (couse I don't find any options to ignore this).
    here is my hot fix:
    --- tar-1.29-origin/src/incremen.c 2016-08-15 15:11:17.933557116 +0200
    +++ tar-1.29/src/incremen.c 2016-08-15 15:11:28.623499707 +0200
    @@ -502,10 +502,14 @@
    }
    else
    {
    - perhaps_renamed = true;
    - directory->children = ALL_CHILDREN;
    - directory->device_number = stat_data->st_dev;
    - directory->inode_number = stat_data->st_ino;
    + const char vrsdot[] = ".";
    + if(strcmp(name_buffer, vrsdot) != 0)
    + {
    + perhaps_renamed = true;
    + directory->children = ALL_CHILDREN;
    + directory->device_number = stat_data->st_dev;
    + directory->inode_number = stat_data->st_ino;
    + }
    }
    if (nfs)
    DIR_SET_FLAG (directory, DIRF_NFS);
    To not make a problem for others software that using tar ... I copy new version to /bin/tar-amanda
    and set in plugin amgtar property:
    property "GNUTAR-PATH" "/bin/tar-amanda"

    also remember to set new secure path in /etc/amanda-security.conf

    meybe this will be useful for someone.

    When ZFS make correction I will post here information.

  5. #5
    Join Date
    Mar 2015
    Posts
    9

    Default

    The better patch: http://pastebin.com/ZjpqYJk3
    This patch add new option "--ignore-root-inode" for tar.
    So just simple add property "COMMAND-OPTIONS" "--ignore-root-inode"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •