Backup Command

The Backup Command

  • backup <key> <bak-opt>* <cmdline-opt>*
    bak <key> <bak-opt>* <cmdline-opt>*
    b <key> <bak-opt>* <cmdline-opt>*
     
    where:
    <bak-opt>
    :=
    <filter-opt> | -cp [ <checkpoint-name> ]
    | <bak-how>
    | <bak-to>
    | -diff
    | -astext
    | -nottext
    | <log-action> | <encrypt-opts>
    | <other-opts>
    <filter-opt>
    :=
    -sel
    | -excl <file-patt>
    | -only <file-patt>
    | -file-list <filename>
    | -delta | -d
    <filelist>
    :=
    "<file-patt>" [ "<file-patt>"]+
    <bak-how>
    :=
    -force
    <bak-to>
    :=
    -inc | -i
    | -bak | -b
    | -main | -m
    | -nomain | -nm
    | -noinc | -ni
    <log-action>
    :=
    -logdiff
    | -nologdiff
    | -reason
    <encrypt-opt>
    :=
    -z | -zip
    | -gz
    | -z2
    | -nz
    | -pass? | -pass <password>
    <cmdline-opt>
    :=
    See section on "Command Line Options".
     
    advanced options:
     
    <other-opts>
    :=
    -share | -sh
    | -noshare | -nsh
    | -nw
    | -w
    | -servloc
    | -asdiff | -ad
    | -notasdir | -asdir
    | -deldiff | -dd
    | -list
    | -seld
    | -regen
    | -copydel
    | -ver <date-spec>
    | -recurse | -r
    | -copy
    | -copytokey
    | -copyk | -direct
    | -notasdir | -asdir
    <date-spec>
    :=
    <mmddyy>.<vv> | <vv> | -<vv>
    • Backs up all the files of the key to their server locations.
    • By default, the 'bak' command copies the files being backed up to three locations on the server:
      1. Each individual backup action puts a copy of that transaction in the 'Incremental' backup server directory, as compressed files by default.
      2. The changes of the individual backup action are added to the set of changes in the 'Daily' backup server directory, as compressed files by default.
      3. The files that changed in the individual backup action are copied to the 'Main' backup server directory. This directory contains the full current image for the key, and the files are uncompressed by default.
    • The first two server backup directories are used to reconstruct specific version of the backup history of a key, via the 'restore' command.
    • The third server backup directory contains the current full image of the files of the key. It may be thought of as the 'release' version of the files. This image is what would normally be downloaded to a new machine.
    • The 'b <key>' command is shorthand for 'bak <key> -d', and requests a back up of only the files that have changed.
    • The '-d' option specifies to only back up the files that have changed, that is, show a difference.
    • For details on how Hyperkey determines that files have been 'changed' see the section on "How Files Are Compared In Hyperkey" .
    • The '-cp' option creates a new Daily backup file with the given checkpoint name. If the name is not provided in the command line, HFL will prompt for it.
      • A checkpoint starts a new record in 'Daily' server location.
      • This allows the user to separate a specific backup during a day as something special. Whereas normally each additional 'Incremental' update is added to the 'Daily' backup file, they are not added to a checkpoint file.
      • Instead, any 'Incremental' updates done on that day past the checkpoint update are added to an additional 'Daily' backup file that gets created on the first of the new updates. This keeps the checkpoint files as a group, which can be accessed separately later if needed.
    • The '-sel' option requests that the user be allowed to select which files get backed up. The user is prompted once for each file whether to back that file up or not. After the user has responded to each of the backup prompts, the user is shown a list of what will be backed up, and prompted whether to complete the backup action. This allows the user one more chance to cancel the backup if the list is not correct.
    • The '-excl <filelist>' option specifies the files or filename patterns that are to be excluded, that is, are not to be backed up. All other files within the range of effect of the key will be backed up. The pattern can be any valid Windows wildcard pattern.
    • The '-only <filelist>' option specifies that only the files in the list of filenames or filename patterns are to be included in the backup, and all others left alone. The pattern can be any valid Windows wildcard pattern.
    • The '-file-list <filename>' option specifies that only the files in the list of filenames stored in the given file are to be backed up, and all others left alone. This is basically the same as the '-only' option, except that the file names are stored separately in a file, instead of being specified in-line.
    • The '-force' option overrides the default backup behavior of the '-delta' option where only files with newer timestamps are backed up. This option forces all files that are different to be backed up. This is needed sometimes when it is desirable to replace a newer version of a file with an older one.
    • The '-inc' option specifies that only the Incremental backup is to be done. The Daily backup file is not updated, not is the Main server copy updated. This allows the user to capture some working changes, without disturbing the final server image. NOTE: There is a slight risk when doing this, as the 'rest' restore action will try to apply those changes, and the resulting image may not be correct for that version.
    • The '-bak' option specifies that only the Daily backup is to be done. The Main server copy is not updated. NOTE: There is a slight risk when doing this, as the 'rest' restore action will try to apply those changes, and the resulting image may not be correct for that version.
    • The '-main' option specifies that only the Main server copy is to be updated. NOTE: There is a slight risk when doing this, as the 'rest' restore action will not have any record of this update.
  • EXAMPLES:
    • Do a 'full' backup key of 'vi' marked as checkpoint 'base':
      • bak vi -cp base

    • Do an incremental backup key of 'vi':
      • b vi

    • Do an incremental backup key of 'vi', but only of files that have file extension '.vi':
      • b vi -only *.vi

    • Do an incremental backup key of 'vi', and for each file be prompted as to whether to include it in the backup:
      • b vi -sel

  • Less-common Options
    • The '-asdiff' option specifies that the files stored in the Incremental and Daily server locations should be stored in the format used by the diff program. This option is generally used to conserve disk space on text files that are excessively large and the changes relatively small.
    • The '-ver' option overrides the default timestamp used to construct the filenames in the Incremental and Daily server directories. It allows the user to create backups that have other dates. Potentially, this could be used to insert versions into the middle of a backup set. But there is a risk that doing so can corrupt the rebuild sequence, and versions past that date would not regenerate correctly in 'diffkey' and 'restore' commands.
Previous: Advanced Commands Next: Diffkey Command