From a3c24b4bbc49254e2e231a55d143fdd3a59854de Mon Sep 17 00:00:00 2001 From: Patrick Sean Klein Date: Tue, 3 May 2022 22:59:39 +0200 Subject: [PATCH] Add database backup path documentation. --- docs/topics/DatabaseOperations.adoc | 2 +- docs/topics/Reference.adoc | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/topics/DatabaseOperations.adoc b/docs/topics/DatabaseOperations.adoc index af3ca6c32..498846d5f 100644 --- a/docs/topics/DatabaseOperations.adoc +++ b/docs/topics/DatabaseOperations.adoc @@ -84,7 +84,7 @@ There are three ways that KeePassXC can handle database files. This behavior is 3. *Direct-write saves* write directly to the existing database file. This is an unsafe operation since any interruption can leave your entire database inaccessible. We only recommend using this option when interfacing with Linux GVFS services (e.g. Google Cloud on Gnome) and other types of storage services that host a virtual drive system. -In addition to these save options, KeePassXC can create a backup of your existing database file just prior to saving. This backup can be placed in a custom folder with a custom file naming scheme. +In addition to these save options, KeePassXC can create a backup of your existing database file just prior to saving. This backup will be saved at the path specified in the *Backup destination* field. This path can be absolute or relative. The latter will be resolved according to the databases path. It is possible to specify a custom naming scheme with placeholders. See xref:UserGuide.adoc#_backup_path_placeholders[Backup Path Placeholders] for available placeholders and examples. image::save_options.png[] // end::advanced[] diff --git a/docs/topics/Reference.adoc b/docs/topics/Reference.adoc index c123befc4..c8642c430 100644 --- a/docs/topics/Reference.adoc +++ b/docs/topics/Reference.adoc @@ -100,4 +100,29 @@ Convert resolved placeholder (e.g., {USERNAME}, {PASSWORD}, etc.) using the foll `{T-REPLACE-RX:/<PLACEHOLDER>/<SEARCH>/<REPLACE>/}` + Use regular expressions to find and replace data from a resolved placeholder. Refer to match groups using $1, $2, etc. + +=== Backup Path Placeholders +[grid=rows, frame=none, width=90%] +|=== +|Database Backup Path Placeholder |Description + +|{DB_FILENAME} |The database's filename without extension +|{TIME} |The current time formatted as dd_MM_yyyy_hh-mm-ss. +|{TIME:} |The current time formatted according to the format string specified by . See https://doc.qt.io/qt-5/qtime.html#toString for a list of available placeholders. +|=== + +[grid=rows, frame=none, width=90%] +|=== +|Backup path example |Location of backup(s) + +|`{DB_FILENAME}-{TIME}.bak.kdbx` |`C:\Users\MyUsername\MyDatabase-02_01_2022_03-04-05.bak.kdbx` + +`C:\Users\MyUsername\MyDatabase-05_01_2022_12-10-00.bak.kdbx` +|`backups\\{DB_FILENAME}.bak.kdbx` |`C:\Users\MyUsername\backups\MyDatabase.bak.kdbx` +|`C:\Backups\{TIME:dd.MM.yyyy}\\{DB_FILENAME}.kdbx` |`C:\Backups\02.01.2022\MyDatabase.kdbx` + +`C:\Backups\05.01.2022\MyDatabase.kdbx` +|`C:\Backups\\{DB_FILENAME}\{TIME:MM-dd-yyyy}.kdbx` |`C:\Backups\MyDatabase\01-02-2022.kdbx` + +`C:\Backups\MyDatabase\01-05-2022.kdbx` +|=== + + // end::content[]