By default SQLBackupAndFTP stores backups in file names like DatabaseNameYYYYMMDDHHMM.zip (eg Pubs201801011120.zip). But you can also use custom file names if you have such needs
Why use custom formats?
If you want to use it to overwrite the old files – you shouldn’t. There’s an auto-delete section in destination settings that allows you to set auto-delete for old files after a specified number of months/days.
If you store files in Dropbox or other cloud storage that supports versioning, you may choose no date format so that the new file overwrites the old, but Dropbox takes care of storing all the versions of the file.
If you use a script to restore a database on another server, then you may want to use no date file naming. Note however that very soon we will be releasing “Restore job” functionality that allows to set up replication without custom file names.
How to set a custom format?
In SQLBackupAndFTP go to Compression Settings (In Compression section click Settings gear icon) and select one of the formats from the list:
Note that Full backups have no suffix, Differential end with *diff.zip and Transaction Log backup files end with *log.zip
By using custom backup file names you are breaking a few things, so before you do that, make sure you are very clear of the trade-offs.
- Auto-delete won’t work with the “no date” format because it needs a date in the file name to understand when it is time to delete it. It will still work if you have YYYYMMDD format
- Tran log backups should not be used with any custom format because they’d overwrite each other.
- overwrite the full backup file made on the same day and would make the restore impossible. Only basic full backups should be used.
- The automated restore (the one done through our interface) would work only in basic full backup restore scenarios.
Basically, you have to know what you are doing if you are using custom formats.
7 thoughts on “Customize backup file name”
I wish I could create my own format. For example databasename-YYYY-MM-DD.7z would be so much easier to read when working with these backup files.
Thanks for considering this.
Sorry, but that is all the custom formats that you can use.
Wish I could change name without zipping, so deduplication and snapshots would work..
I suggest MMM instead of just having MM. This is more readable and meaningul and avoids confusion when the month is 7 and the date is 6 e.g. DBNAME-2021JUL061030.zip (instead DBNAME-202107061030.zip).
Thank you for your request.
It’s possible to use a name format like Code-DatabaseNameYYYYMMDD.bak?
I need to backup a lot of shops to a central server and restore the backups to it thus having a centralized location with a DB per shop.
Sorry, but all the available formats are specified in the screenshot in the blog post.
If you need to manage many servers from one place, please take a look at our other backup tool SqlBak. SqlBak has a very convenient Dashboard page to mage the connected servers.