tar: User Hooks

1 
1 5.4.3 User Hooks
1 ----------------
1 
1 "User hooks" are shell functions executed before and after each 'tar'
1 invocation.  Thus, there are "backup hooks", which are executed before
1 and after dumping each file system, and "restore hooks", executed before
1 and after restoring a file system.  Each user hook is a shell function
1 taking four arguments:
1 
1  -- User Hook Function: hook LEVEL HOST FS FSNAME
1      Its arguments are:
1 
1      LEVEL
1           Current backup or restore level.
1 
1      HOST
1           Name or IP address of the host machine being dumped or
1           restored.
1 
1      FS
1           Full file name of the file system being dumped or restored.
1 
1      FSNAME
1           File system name with directory separators replaced with
1           colons.  This is useful, e.g., for creating unique files.
1 
1    Following variables keep the names of user hook functions:
1 
1  -- Backup variable: DUMP_BEGIN
1      Dump begin function.  It is executed before dumping the file
1      system.
1 
1  -- Backup variable: DUMP_END
1      Executed after dumping the file system.
1 
1  -- Backup variable: RESTORE_BEGIN
1      Executed before restoring the file system.
1 
1  -- Backup variable: RESTORE_END
1      Executed after restoring the file system.
1