Usage of variables in BackupDrive
Variables are supported since the first version of BackupDrive. Variables are small placeholders that can be inserted into text fields. The software then replaces these placeholders with current values, such as: the time or the current username.
These are mainly used in the backupjob settings. Variables such as the current timestamp or the computer name are often added to the destination path of the backup.
Variables are also used in notification emails. Variables are used to query the current information of a backup and include these dynamically into the text of the email.
General variables
The variables listed in the table below can be used as placeholders in most areas of the program.
To insert a variable you have to click on the pin symbol. A window will appear showing all available variables with a description and an example. Now the desired placeholder can be selected and inserted.
Another option is to copy one of the variables listed here and paste it directly into the text box.
However, it should be noted that not all text boxes support variables.
Variable | Example value | Description |
---|---|---|
{year} | 2018 | Year |
{month} | 02 | Month |
{day} | 25 | Day |
{hour} | 17 | Hour |
{minute} | 32 | Minute |
{second} | 08 | Second |
{time_in_millis} | 1500890770597 | Time in milliseconds (UNIX-Timestamp) |
{timestamp} | 2017-07-24_11-53 | Timestamp |
{computer_name} | Office-Computer | Computername |
{java_vendor} | Oracle Corporation | Java-Vendor |
{java_version} | 1.8.0_45 | Java-Version |
{os_arch} | amd64 | Architecture of the operating system |
{os_name} | Windows 8.1 | Name of the operating system |
{os_version} | 6.3 | Version of the operating system |
{user_name} | Peter | Username |
{user_language} | de | Language of the user |
{version} | 1.0.0 | BackupDrive version |
Variables for email notifications
The variables listed in the following table can only be used for the email notification feature.
These are added to the backupjob settings in the Email Notification tab by clicking the pin icon. This will allow the subject and content of the email to send accurate information about the backup you have performed.
Variable | Example value | Description |
---|---|---|
{status} | failed (FAILED) | Transmission status |
{job_name} | Backup_Documents | BackupJob name |
{transm_mode} | FTP | Transmission mode |
{target_dir} | /Backup/{timestamp}/Documents/ | Target directory of the backup |
{size_transf} | 0 B | Transferred data size |
{size_source} | 100 KiB | Total space |
{tansf_perc} | 47 % | Transferred in per cent |
{count_dirs} | 24 | Number of directories |
{count_files} | 56 | Number of files |
{count_transf_dirs} | 19 | Number of transmitted directories |
{count_transf_files} | 37 | Number of transmitted files |
{starttime} | 06.08.2018 15:17:12 | Start time |
{endtime} | 06.08.2018 15:18:01 | End time |
{duration} | 49 Seconds | Transmission time |
{duration_ms} | 49000 | Transmission time in milliseconds |