Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| keepass [06/22/2026 15:02] – johnsonjohn | keepass [06/22/2026 15:05] (current) – johnsonjohn | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ---- | ---- | ||
| <code javascript instructions.js> | <code javascript instructions.js> | ||
| - | keepass trigger to save a file with date when saving databaseTo automatically save a dated backup copy of your KeePass database every time you save, you need to use the {DT_SIMPLE} placeholder inside a KeePass trigger. | + | keepass trigger to save a file with date when saving databaseTo automatically save a dated backup copy of your KeePass database every time you save, you need to use the {DT_SIMPLE} placeholder inside a KeePass trigger. |
| + | This placeholder dynamically appends the current date and time (in YYYYMMDDHHMMSS format) to your file name.Follow these steps to set up the automation using the KeePass Trigger System: | ||
| + | Step 1: Create a New TriggerOpen KeePass and go to Tools → Triggers...Click the Add button at the bottom right.In the Properties tab, give your trigger a name (e.g., Dated Backup on Save). | ||
| + | Make sure both Enabled and Initially on boxes are checked.Step 2: Set the EventClick on the Events tab and click Add.In the Event Id drop-down menu, select Saved database file. \\ | ||
| + | Leave the rest of the event settings as default and click OK.Step 3: Add the ActionClick on the Actions tab and click Add.In the Action Id drop-down menu, select Create backup of active database. | ||
| + | In the File/URL field, enter your preferred backup folder path along with placeholders: | ||
| + | How it works: {DB_BASENAME} automatically pulls your current file name, and {DT_SIMPLE} adds the unique date/time string so your files never overwrite each other.Click OK, and then click OK again to save your new trigger rules. | ||
| + | Alternative Option: Use a Dedicated PluginIf you prefer not to manage triggers manually, you can use popular open-source plugins like KPSimpleBackup. | ||
| + | It automatically copies, dates, and retains a fixed number of backups every time you click save without requiring any trigger logic.If you run into path errors or need to know \\ | ||
| + | how to restrict this to only one specific database, let me know your operating system and target backup path! | ||
| </ | </ | ||