Export Filename Templates
Naming exported files automatically so a folder of backups stays legible.
Every export panel has a Customize… button in its lower left that opens the Export File Name template editor. A template is text containing tokens, each replaced with a value from the export when the file is written. Templates are remembered per export format.
A Complete Example #
[#nickname#]-[#database#]-[#table#]-[#yyyy-mm-dd#]-[#hhmm tz#]
Exporting the film table of the sakila database from a saved connection named "Production", as SQL, on September 11, 2026 at 2:30 PM Pacific Daylight Time gives:
Production-sakila-film-2026-09-11-1430PDT.sql
Tokens #
| Token | Replaced with |
|---|---|
[#nickname#] |
The saved connection's name. Tells you which server a file came from. |
[#host#] |
The server's host. |
[#sshhost#] |
The SSH host, for tunneled connections. |
[#database#] |
The database being exported. |
[#schema#] |
The schema. |
[#table#] |
The table, when exporting a single table. |
[#yyyy-mm-dd#] |
The date, as 2026-09-11. |
[#yyyymmdd#] |
The date, as 20260911. |
[#year#], [#year2#], [#month#], [#day#] |
Date components: four-digit year, two-digit year, month, day. For example 2026, 26, 09, 11. |
[#hh:mm tz#], [#hh:mm utc#] |
The time with a colon, in local time or UTC. For example 14:30-07:00 and 21:30+0000. |
[#hhmm tz#], [#hhmm utc#] |
The time without a colon, in local time or UTC. For example 1430PDT and 2130+0000. Colons cause trouble in filenames on other systems, so prefer these. |
[#extension#] |
The format's file extension. Querious always adds the extension to the end of the name for you, so you don't need this token. |
Tokens are case-insensitive. A token that has no value for the export, such as [#table#] when exporting a whole database, becomes nothing.
Examples #
These examples assume a saved connection named "Production" on the host db.example.com, exporting the film table of the sakila database as SQL on September 11, 2026 at 2:30 PM Pacific Daylight Time.
| Template | File name |
|---|---|
[#database#]_[#table#]_[#yyyymmdd#]_[#hhmm tz#] |
sakila_film_20260911_1430PDT.sql |
[#nickname#]-[#database#]-[#yyyy-mm-dd#]-[#hhmm tz#] |
Production-sakila-2026-09-11-1430PDT.sql |
[#host#] [#database#] [#table#] |
db.example.com sakila film.sql |
backup-[#year#][#month#][#day#]-[#hhmm utc#] |
backup-20260911-2130+0000.sql |
[#database#]-[#table#], when exporting a whole database |
sakila-.sql |
The first template is the default. Because Querious adds the extension itself, a compressed export is named with both, such as .sql.gz.
Recipes #
To name backups so they sort by age
-
Click Customize… in the export panel.
-
Start with what identifies the export and end with the timestamp:
[#nickname#]-[#database#]-[#yyyy-mm-dd#]-[#hhmm tz#] -
Sorting the folder by name now sorts it by date.