Trigger allows you do backup of current database to specified folder. It shows confirmation message box. Beeps when success and shows error message box when fails. Backup files store in format ‘DatabaseName.DbExtension.20210903170534
‘
- KeePass main window — Main menu — Triggers — Tools button — Paste Triggers from Clipboard
- Seect ‘Backup button trigger’ trigger — Edit… button — Actions tab — Select ‘Execute command line..’ line — Edit button — Edit ‘Arguments’ line — Change ‘
X:\Path\
‘ to your backup path.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
<?xml version="1.0" encoding="utf-8"?> <TriggerCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Triggers> <Trigger> <Guid>EO34PeZT+UqqlmoOov/nXQ==</Guid> <Name>Backup button add</Name> <Events> <Event> <TypeGuid>2PMe6cxpSBuJxfzi6ktqlw==</TypeGuid> <Parameters /> </Event> </Events> <Conditions /> <Actions> <Action> <TypeGuid>lYGPRZlmSYirPoboGpZoNg==</TypeGuid> <Parameters> <Parameter>btn_Backup</Parameter> <Parameter>BAK</Parameter> <Parameter /> </Parameters> </Action> </Actions> </Trigger> <Trigger> <Guid>foc+r87BDkKjRrPY5b4NuA==</Guid> <Name>Backup button clicked</Name> <Events> <Event> <TypeGuid>R0dZkpenQ6K5aB8fwvebkg==</TypeGuid> <Parameters> <Parameter>btn_Backup</Parameter> </Parameters> </Event> </Events> <Actions> <Action> <TypeGuid>CfePcyTsT+yItiXVMPQ0bg==</TypeGuid> <Parameters> <Parameter>Backup?</Parameter> <Parameter>{DB_NAME} will be copied to the server. Continue?</Parameter> <Parameter>32</Parameter> <Parameter>4</Parameter> <Parameter>0</Parameter> <Parameter>1</Parameter> <Parameter>1</Parameter> <Parameter /> </Parameters> </Action> <Action> <TypeGuid>2uX4OwcwTBOe7y66y27kxw==</TypeGuid> <Parameters> <Parameter>PowerShell.exe</Parameter> <Parameter>-Command try { Copy-Item "{DB_PATH}" "X:\Path\{DB_NAME}.{DT_SIMPLE}" -errorAction stop; [System.Console]::Beep(400,50);} catch { Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show($_, 'Backup error','Ok','Error') }</Parameter> <Parameter>False</Parameter> <Parameter>1</Parameter> <Parameter /> </Parameters> </Action> </Actions> </Trigger> </Triggers> </TriggerCollection> |
More info on KeePass site.