IdEst – ID3 Editing and Scripting Tool (split by section):   Section:   Chapter:FastBack: Scripting   Up: Top   FastForward: Invocation   Contents: Table of ContentsIndex: Concept Index

11 Keeping Backup Copies

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 if VERSION_CONTROL is not set, the ‘existing’ method is assumed.

Available backup methods are:

never
simple

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.

t
numbered

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.

nil
existing

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.

IdEst – ID3 Editing and Scripting Tool (split by section):   Section:   Chapter:FastBack: Scripting   Up: Top   FastForward: Invocation   Contents: Table of ContentsIndex: Concept Index