You must supply the source and destination. The source has the format: src_filer:src_dir where src_filer is the name of the filer being copied from, and src_dir is the absolute pathname of the directory being copied. The destination has the format dest_filer:dest_dir where dest_filer is the name of the filer being copied to, and dest_dir is the absolute pathname of the directory to which the source directory is being copied. The destination directory is created if it does not already exist.
-sa Source authentication. If this flag is followed by the word none, then no authentication is used. If it is followed by a user specification then text authentication is used. A user specification consists of "user:password" where user must be root and password must be the console password of the source filer. Network Appliance filers currently support only text authentication. The default is text authentication with user root and no password. Only enter the password using this method if you don't mind giving the password away to anyone logged into the same machine.
-da Destination authentication. If this flag is followed by the word none, then no authentication is used. If it is followed by a user specification then text authentication is used. A user specification consists of "user:password" where user must be root and password must be the console password of the destination filer. Network Appliance filers currently support only text authentication. The default is text authentication with user root and no password. Only enter the password using this method if you don't mind giving the password away to anyone logged into the same machine.
-sport port NDMP port to use for the source filer. This should normally be left unchanged. The default is 10000.
-dport port NDMP port to use for the destination filer. This should normally be left unchanged. The default is 10000.
-dhost hostname Destination host for data transfer if it is not the same as the destination NDMP host. This is useful if your destination host has multiple network interfaces and the bulk data should go over a different link than the NDMP connection. One example of this would be if the filers are connected to the host running ndmpcopy via a 10 Mb/s ethernet, but the filers are linked together by a 100 Mb/s ethernet as well. The hostname specified by -dhost should be the name or IP address of the 100 Mb/s interface on the destination machine.
-level 0 - 9 Without the -level option ndmpcopy always performs a level 0 dump. When the -level option is provided the restore process is requested to "incrementally restore" the dumped files and uses the 'restore_symboltable' file in the process so that incremental dumps can be carried out. Each restore will leave behind a 'restore_symboltable' file regardless of this option.
-v Increase the verbosity. The default (level 1) will display the dump log messages received from the dumping filer. One -v (level 2) displays NDMP status information as well.
-q Increase the quietness (Decrease the verbosity). This flag will counteract any -v flags present. If there are more -q flags than -v flags, no status information will be displayed. Usually it doesn't make sense to specify both -q and -v, but it works.
-dpass Enter different passwords for the source and destination NDMP hosts. This is only needed if not entering the password on the command-line.
-d debug_level Specify the NDMP debug level. A of 65535 will display all NDMP protocol messages.
-h Display the helpful usage message and default values for the optional flags.
The following examples use the "feature" that allows you to enter the filer password on the command line, showing it to everyone else logged into your system, and probably putting it into your shell history file.
To copy the directory /home/ from host fred to / on host barney using no authentication on the fred and text authentication with user root and password ub2foo on barney. Run the following on the machine that has ndmpcopy installed:
example% ndmpcopy fred:/home barney:/ -sa none -da root:ub2fooTo copy everything on host pebbles to /pebbles on host bambam using user root and password rootpass and NDMP port 15000 instead of 10000 on bambam. Run the following on any machine:
example% ndmpcopy pebbles:/ bambam:/pebbles -sa root:rootpass -da root:rootpass -dport 15000To copy everything on host john to /monty on host cleese using user root and password rootpass and a private fast (say fddi) interface connection. Run the following on any machine:
example% ndmpcopy john:/ cleese:/monty -sa root:rootpass -da root:rootpass -dhost fddi_ip_addrOn some occassions the restore will complete before the source filer has successfully sent all the dump trailer information and ndmpcopy will leave a message similar to:
filer: HALT: The operation was successful! Waiting for filer to halt too. (If it sits here forever, the transfer was successful, but the source filer has hung. Press ^C.)Simply stop the current ndmpcopy process, the data transfer has succeeded, however the filers have failed to inform each other of this fact!
4 0 The transfer finished successfully.
>0 An error occurred.