AMZFS-SNAPSHOT(8)

πŸ’… amzfs-snapshot(8) β€” the Amanda script that makes zfs snapshots (yes, that's amzfs-snapshot, section 8 of the manual, we love a system administration command πŸ‘‘

okay so bestie, buckle up 🫢

✨ NAME ✨

amzfs-snapshot β€” an Amanda script that creates a zfs snapshot. literally its whole personality πŸ’–

🌸 SYNOPSIS 🌸

no synopsis here babes β€” this one isn't for typing at your shell, and the page will tell you exactly why πŸ‘‡

πŸ¦‹ DESCRIPTION πŸ¦‹

amzfs-snapshot is an Amanda script implementing the Script API. it should not be run by users directly 🚫 β€” like, do not. It creates a zfs snapshot of the filesystem where the path specified is mounted. that's it, that's the job ✨

PRE-DLE-* create a snapshot, and the POST-DLE-* destroy the snapshot. and for the rest to actually happen, *-DLE-AMCHECK, *-DLE-ESTIMATE and *-DLE-BACKUP must be set to be executed on the client:

execute-on  pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup
execute-where client

The PRE_DLE_* script outputs a DIRECTORY property telling where the directory is located in the snapshot πŸ“. The application must be able to use the DIRECTORY property β€” amgtar can do it, no cap πŸ’…

The script is run as the amanda user, and it must have the privilege to create and destroy snapshot:

zfs allow -ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM

Some systems don't have "zfs allow" 😭, but 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_USER

This will require that you run zfs under pfexec β€” set the PFEXEC property to YES. πŸ”₯

The format of the DLE must be one of these five, periodt:

  • Description: Mountpoint β€” example: /data
  • Description: Arbitrary mounted dir β€” example: /data/interesting_dir
  • Description: ZFS pool name β€” example: datapool
  • Description: ZFS filesystem β€” example: datapool/database
  • Description: ZFS logical volume β€” example: datapool/dbvol
⚠️ the filesystem must be mounted. like, non-negotiable, bestie.

πŸŽ€ PROPERTIES πŸŽ€

This section lists the properties that control amzfs-snapshot's functionality. See amanda-scripts(7) for information on the Script API and script configuration 🧚

  • DF-PATH β€” path to the df binary. by default it's searched in $PATH πŸ”
  • ZFS-PATH β€” path to the zfs binary. default: searched in $PATH πŸ”
  • PFEXEC-PATH β€” path to the pfexec binary. default: searched in $PATH πŸ”
  • PFEXEC β€” if it's "NO" (the default), pfexec is not used. if it's set to "YES", then pfexec is used. that's the whole vibe check βœ…

πŸ‘‘ EXAMPLE πŸ‘‘

In this example, a dumptype is defined to use the amzfs-snapshot script to create a snapshot and use amgtar to backup the snapshot. iconic collaboration honestly 🀝

 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" "/usr/sbin/df"
   #property "ZFS-PATH" "/usr/sbin/zfs"
   #property "PFEXEC-PATH" "/usr/sbin/pfexec"
   #property "PFEXEC" "NO"
 }

 define dumptype user-zfs-amgtar {
   dt_amgtar
   script "amzfs_snapshot"
 }

🌈 SEE ALSO 🌈

amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)

The Amanda Wiki: : http://wiki.zmanda.com/ β€” go click around, iykyk πŸ’œ

πŸ’œ AUTHORS πŸ’œ


that's the whole page, babes πŸ“ this was Amanda 3.5.4, dated 07/23/2025 β€” go forth and snapshot responsibly, mwah πŸ’‹πŸ’…

πŸ“¦ where this page comes from