Forum Discussion

mcj's avatar
mcj
Level 2
14 years ago
Solved

NetBackup and ZFS Snapshots

Hello,

I'm having a bit of trouble getting Netbackup 7 to work properly with ZFS snapshots on Solaris 10u9, and searches so far have not turned up any results matching my issue here.

Basically, I have a bunch of ZFS filesystems mounted under /zones/.  A bpstart_notify script is successfully creating snapshots called "backup".  My goal here is to back up the snapshots rather than the live data.  To accomplish this, I have created an exclude_list that contains:

/zones/

and an include list that contains:

/zones/xxx0/.zfs/snapshot/backup
/zones/xxx1/.zfs/snapshot/backup

The exclude list is working as intended, and it's skipping everything under /zones/:

19:13:20.294 [28055] <4> is_excluded: Excluded /zones/xxx0 by exclude_list entry /zones/

However, none of the filesystems in the include_list are getting backed up.  I am also not seeing any reference to the include_list file in the bpbkar logs, but I'm not sure whether or not there should be any.

Has anybody gotten a setup like this to work?  I've seen other people creating clones of the snapshots and mounting those in a separate location, but I'd prefer to use the read-only snapshots directly if at all possible.

Thanks.

  • i.e.

    backup selection: /path/
    exclude_list: /path/
    include_list: /path/.zfs/snapshot

    - this resulted in a backup of an empty directory (/path). Maybe it cannot correctly read the .zfs element of the path in the include list?

     

    Re-tried by expanding the backup selection & removing the exclude/include lists (i.e. my initial suggestion)

    backup selection: /path/.zfs/snapshot
    exclude_list: n/a
    include_list: n/a

    - this resulted in a successful backup of the contents of the directory as expected.

  • but as you are creating a certain amount of admin with your exclude/include lists, why not just stipulate the paths that you wish to include directly into your backup selection?

    e.g. the test policy that I've still got created has path/.zfs/snapshot as it's backup selection & I'm 99%(ish) sure that it worked.

  • I can certainly try that.  I am not the backup admin, so I am trying to minimize the amount of work on the admin side for issues that can be handled by me on the client side, but if it has to go that way, I guess we don't have much choice.  smiley

    One question - would I still exclude /path/ in the exclude_list if /path/.zfs... is in the backup selection?

    Thanks!

  • No - as NB won't even attempt to back anything up other than what's specified in the backup selection
    i.e. /path/.zfs.

    It was only a suggestion as to what I got to work. Maybe someone else has managed to achieve something more akin to the method you're using?

  • i.e.

    backup selection: /path/
    exclude_list: /path/
    include_list: /path/.zfs/snapshot

    - this resulted in a backup of an empty directory (/path). Maybe it cannot correctly read the .zfs element of the path in the include list?

     

    Re-tried by expanding the backup selection & removing the exclude/include lists (i.e. my initial suggestion)

    backup selection: /path/.zfs/snapshot
    exclude_list: n/a
    include_list: n/a

    - this resulted in a successful backup of the contents of the directory as expected.

  • Thank you for trying that out.  My best guess as to why it won't grab the .zfs subdirectory is because it's "hidden" from a regular ls/stat()/whatever.  I'd think this behaviour would be documented somewhere...it can't be all that strange a thing to try and do.  smiley

    Thanks again for your help.