B.3 metamig

The NSS File System Metadata Migration Utility (METAMIG) for Linux allows you to save and restore NSS file system trustee, user quota, and directory quota metadata.

B.3.1 Syntax

METAMIG is located in the /opt/novell/nss/sbin/metamig directory.

metamig [OPTIONS]
metamig save volume [SOPTIONS]
metamig restore volume [ROPTIONS]

B.3.2 Arguments

The first argument indicates the action to be taken on the specified NSS volume. Possible actions are Save and Restore.

Argument

Description

save

Saves the indicated metadata to stdout.

restore

Restores the indicated metadata to stdin.

The second argument specifies the NSS volume name to be saved or restored.

The third argument specifies the path to a file. This is the file to be created on save, or the file to be restored from on restore.

B.3.3 Options

Several option types are available:

General Options

The following options are general options available to actions related to save or restore.

Option

Description

-v, --version

Displays the program version information.

-h, --help

Displays the help screen.

SOptions (Save)

The following options are options available to actions related to save.

Option

Description

-m, --meta=mask

The types of metadata to be saved. If a value is not specified, it defaults to all. For information, see Mask.

-n, --ncp

Saves the trustee metadata from the NCP Trustee database instead of parsing the volume to generate the data. Use this option only if you are confident that the NCP Trustee database is available and current.

For example, if the NCP Server has been turned off and its database is not yet resynchronized with the volume, do not use this command option until the database is again current.

ROptions (Restore)

The following options are options available to actions related to restore.

Option

Description

-m, --meta=mask

The types of metadata to be restored. If a value is not specified, it defaults to all. For information, see Mask.

-f, --filter=regexp

A filter that restores only files and directories that match the specified regular expression. Use a regular expression to specify one or more files and directories to be restored.

For example, to set criteria to restore only files with names that start with the letter “a”, use this option:--filter=.*\\a.*

Please refer to a programming textbook or search the Internet for information about how to construct regular expressions.

-t, --tree=treename

If this value is specified, this setting overrides the saved directory treename.

-d, --details

Displays all actions taken.

-w, --inputfilefromnetware

Specify this option if the input file is generated by TRUSTEE.NLM on the NetWare 6.5 SP8 server.

Mask

The mask is a string of characters with each character representing a type of NSS file system metadata. Use the mask to specify values for the meta parameter in SOptions (Save) and ROptions (Restore).

Option

Description

t

Trustees

u

User quotas

d

Directory quotas

a

All metadata

B.3.4 Examples

To save the user quota data and directory quota data for a volume called VOL1 in the /backup/volquotas file, enter

metamig save VOL1 -m ud >/backup/volquotas

To restore the user quota data from the file /backup/volquotas to VOL1, enter

metamig restore VOL1 -m u </backup/volquotas