26 April 2017
26 April 2017

Using striped backups with SQL Clone

Can we use a striped backup as the source for a SQL Clone image? Yes we can!

If you’re a Redgate SQL Backup customer, occasionally you’ll need to convert your SQL Backup (.sqb) files to the native SQL Server backup format (.bak), perhaps to perform native database restores on a server where SQL Backup isn’t installed. This produces a striped backup, because each thread used when making the backup will produce a separate file.

Can we use a striped backup produced in this way, or indeed any striped backup, as the source for a SQL Clone image? Short answer: we can! Let’s see how that works.

Create the striped backup

I used the SQL Backup file converter (sqbconverter) to convert an .sqb backup file for my PartsUnlimited database to a native, striped backup. By default, this stripes the backup across seven files, as shown in Figure 1:

striped backups
Figure 1

To restore this database in SQL Server, I need to include all seven files in the RESTORE DATABASE command. Likewise, if I want to use SQL Clone to create an image from this striped backup, I’ll need to include all seven files.

Creating an image from a striped backup

To create a new image from a striped backup using the SQL Clone GUI, choose Backup as the source type for the new image, and click Next to move to the Backup location dialog, where you need to enter the location of the backup files, and choose a SQL Server instance for the “pass-through” restore. SQL Clone restores the backup directly into the image, so no temporary storage is required, and the imaging process takes about the same time as a normal database restore operation.

The backup location defaults to the instance backup location, which is the default SQL Server backup location. I have one only instance registered on this machine, so I only see the one choice:


Figure 2

I still need to specify the backup file name(s), on the screen shown in Figure 2. The important part for striped backups is to specify one file path per line, as indicated in the help text below the box. In other words, we’ll have seven lines, each one indicating the path and file name for each file.

I learned a good trick from Gianluca Sartori (@spaghettidba) in a tweet, which makes this task easy. Highlight all seven files, hold down the Shift key while right-clicking, and then select Copy as path from the pop up menu:


Figure 3

Finally, simply paste the contents of the clipboard into the backup file name(s) box. The path for each file will be enclosed with quotes, and you need to remove those, as shown in Figure 4:


Figure 4

If you forget to remove the quotes, SQL Clone won’t let you move forward and you’ll see an error message:


Figure 5

Once the paths are correct, the rest of the process is easy and you just need to choose an image destination. I’m using a local folder on my test machine, but development teams will want a network path (or a share).


Figure 6

Now give the image a name. I don’t need to denote the source as a striped backup, but I did for this demo.


Figure 7

That’s it. Click Create Image, and SQL Clone will produce the image. The time required to build the image depends on your backup size, but this is a one-time cost. After that, each database clone produced from that image will be created in seconds, and occupy only a few tens of MB on the target machine.

SQL Clone works with any striped backup

SQL Clone works with any type of SQL Server database backup, including native backup files (.bak), striped or otherwise, SQL Backup files (.sqb), and .sqb files that have been converted to native striped backups.

Having created the image, creating clones for your developers, your testers, for team-based database development, parallel test runs, or for any other purpose, is quick and easy.

All of which is reason enough to take advantage of SQL Clone’s 14-day, fully-functional free trial and discover what it can do for you.

Tools in this post

SQL Clone

Clone SQL Server databases in seconds and save up to 99% disk space.

Find out more

Share this post.

Share on FacebookShare on Google+Share on LinkedInTweet about this on Twitter

You may also like

  • Article

    How to automatically provision sanitized data using SQL Clone, Data Masker and PowerShell

    Chris Unwin describes a strategy, using data masking, cloned databases and PowerShell, which will allow you to sanitize data before provisioning test or development environments.

  • Article

    Scripting Custom SQL Server Clones for Database Development and Testing

    Phil Factor shows how to automatically apply T-SQL modification scripts during image and clone creation. Using this technique you can, for example, apply data masking to all clones, or customize an individual clone to work on a special variant or branch version, or set up instance level objects like Agent jobs or linked servers.

  • Article

    Database provisioning from backups using SQL Clone

    A step-by-step guide to creating an image from a database full backup, or from a full backup plus differential backup.

  • Webinar

    Does your current provisioning process meet regulatory requirements?

    DevOps practices, applied to the database, aim to allow organizations to deploy databases at the frequency they need, without introducing an unrealistic administration burden, and without compromising that organization’s compliance with data privacy or security regulations. In this webinar, Product Manager Richard Macaskill explains how to incorporate Redgate’s new SQL Provision into your Database DevOps

  • Article

    Create, protect and manage non-production databases with SQL Provision

    SQL Provision allows users to create copies of SQL Server databases in seconds, using a fraction of disk space, and mask any sensitive data to help address data privacy and protection concerns. It serves as a gateway between production and non-production environments, to ensure the safe distribution of database copies from one central location, without blocking the team's development and release processes.

  • Forums

    SQL Clone Forum

    Create SQL Server database copies in an instant