Copying Files

nnbackup.exe copy -i c:\data\ -o d:\backup\data\ [options]
nnbackup.exe copyz -i c:\data\ -o d:\backup\data\ [options]

Traditional copying of files and directories is the most common (but neither most reliable or most effective) way of backing up your data. The copying mode is the default mode used by nnBackup, which is to say that if a user does not explicitely specify a working mode, nnBackup will be started in the copying mode:

nnbackup.exe -i c:\data\ -o d:\backup\data\ [options]

The main advantage of using this mode is its simplicity. All you need to do in order to successfully copy some files from one directory is to specify the input directory, containing the source data (option -i), and the output (receiver) directory (option -o). If required, you can specify several input directories/files:

nnbackup.exe -i c:\data -i c:\another_data -o d:\backup\data

By using the other command line options, you can fine-tune nnBackup's behaviour and set it up so that it will copy only those files that answer some requirements specified by you. The main criterions for selection of file are the filename masks, both inclusive and exclusive (options -m, -x), time of creation and last modification of a file (options -D, -DC, -DW), file size (options -LT, -GT) and file attributes (options -a, -ax).

Use copyz mode if you like to copy your files and directories into compressed zip-file.

nnbackup.exe copyz -i c:\data -o d:\backup\data -v 

The compression library (zlib) which is used in nnBackup impose a limitation on the size of zip archives that can be created: they cannot be larger than 2 gigabytes. If you need to create archives larger than 2 Gb, you can call the external command line archiever by specifying the -extzip nnBackup option. See the description of -extzip option for more details.

nnbackup.exe copyz -i c:\data -o d:\backup\data -v -extzip RAR

The -nocopy option will allow you to test the command line that you are going to use: nnBackup will imitate the process of file copying, but the files won't be actually copied:

nnbackup.exe -i c:\data -o d:\backup\data -v -nocopy

Examples:

nnbackup.exe copy -i c:\data -o d:\backup\data -m *.doc,*.rtf,*.txt,*.htm* -x *.tmp

Explanation: Copy from directory c:\data to d:\backup\data all the hypertext documents and documents with extensions .doc, .rtf, and txt. Do not copy temporary files.

nnbackup.exe copyz -i c:\data -o d:\backup\data -m *.doc,*.rtf,*.txt,*.htm* -x *.tmp

Explanation: Copy from directory c:\data all the hypertext documents, documents with extensions .doc, .rtf, and txt. Do not copy temporary files. Compress the files into d:\backup\data.zip.

nnbackup.exe copy -i c:\data -o d:\backup\data -D 05.12.2002 -log d:\log\nnbackup.log -v -s

Explanation: Copy from c:\data to d:\backup\data all the files modified after 05.12.2002. While copying, take in account all the subdirectories within c:\data and show names and full paths of copied files. Save the information about the backup session to d:\log\nnbackup.log

nnbackup.exe copyz -i c:\data -o d:\backup\data -D 05.12.2002 -log d:\log\nnbackup.log -v -s

Explanation: Copy from c:\data all the files modified after 05.12.2002. While copying, take in account all the subdirectories within c:\data and show names and full paths of copied files. Save the information about the backup session to d:\log\nnbackup.log. Compress the files into d:\backup\data.zip.


See also: