Build Dynamic Backup Locations with Minion Backup

When you back up your database with a third-party party backup utility, you’re almost always stuck with their hard coded path structure and file names.  But Minion Backup – our free SQL Server backup tool –  gives you fully dynamic paths and file names. You can even programmatically change them based on any criteria.  We call this our Inline Tokens, and it’s incredibly powerful. The Basics In Minion Backup, the file and path info is stored in the Minion.BackupSettingsPath table, and it looks like this: These are just a few columns from the table.  You’ll notice right away that BackupPath and FileName include SQL Server wildcards.  These are built-in parameters you can use to build your own strings. Let’s look at a couple examples with FileName. Default Backup File Names It’s very easy to stripe your backup files with Minion Backup; when you stripe, it’s an excellent idea to number your files in the FileName itself. For example, “1Of3masterFull”, “2Of3masterFull”, and so on. In Minion.BackupSettingsPath above, the FileName string looks like this: %Ordinal%Of%NumFiles%%DBName%%BackupType% Each of these wildcards stands for something: %Ordinal% – The ordinal number of the current file in the stripe. %NumFiles% – The total number of files in the stripe. %DBName% – The name of the DB being backed up. %BackupType% – Full, Diff, or Log. So, the files for an AdventureWorks full backup look like this: 1Of5AdventureWorksFull.bak 2Of5AdventureWorksFull.bak 3Of5AdventureWorksFull.bak 4Of5AdventureWorksFull.bak 5Of5AdventureWorksFull.bak Custom Backup File Names That’s just the default setting, though.  Instead, you can choose a different filename format. For example: %Ordinal%outOf%NumFiles%_%DBName%_%BackupType% would yield: 1outOf5_AdventureWorks_Full.bak 2outOf5_AdventureWorks_Full.bak 3outOf5_AdventureWorks_Full.bak 4outOf5_AdventureWorks_Full.bak 5outOf5_AdventureWorks_Full.bak And, %DBName%_%BackupType%_%Ordinal%outOf%NumFiles% would produce files named: AdventureWorks_Full_1outOf5.bak AdventureWorks_Full_2outOf5.bak... read more

SQL maintenance is a lifecycle, not an event!

You’ve heard me talk about this many times, in so many different ways, but it’s worth repeating: SQL maintenance lifecycles are important.

People who disagree, disagree because they spend too much time firefighting and don’t have time to really think about it. Don’t know anything about SQL maintenance lifecycles? Let’s touch on a couple of points…today, we’ll cover SQL backup.

read more