ID3 Editing and Scripting Tool
Idest offers options for making backups of files before
modifying them. Two ways of creating backup copies are supported.
First, backups may be made by copying the file to another file
before modifying it. This backup method is enabled using the
--backup command line option. This option takes a single
optional argument, which specifies backup method, i.e. the
naming scheme for backup copies. If used without the argument, the
value of the
VERSION_CONTROL environment variable is used. And
VERSION_CONTROL is not set, the ‘existing’ method is
Available backup methods are:
Make simple backups. The backup file name is created by appending the backup suffix (‘~’ character by default) to the original file name. If a file with such name already exists, this algorithm is applied again, until a unique name is found.
For example, first call to:
$ idest --backup=simple track01.mp3
will create backup copy in file track01.mp~. Second invocation of the same command will create a backup file named track01.mp~~, and so on.
The default backup suffix is ‘~’, but it can be changed using the
--backup-suffix command line option or
SIMPLE_BACKUP_SUFFIX environment variable.
Always make numbered backups. The backup file name is created by appending a unique numeric suffix to the original file name. For example, when using:
$ idest --backup=t track01.mp3
the first backup will be called track01.mp3.~0~, the second one will be called track01.mp3.~1~, etc.
Make numbered backups of files that already have them, simple backups of the others.
Yet another way to create backup copies is to copy the file to be modified to a separate directory. It can be requested with the backup-directory option, e.g.:
$ idest --backup-directory=/var/backups track01.mp3
If the backup directory already contains a copy of the file, the new backup name will be chosen using the method set with the --backup command line option.
This document was generated on March 11, 2017 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.