{"id":8026,"date":"2019-04-17T20:04:58","date_gmt":"2019-04-17T10:04:58","guid":{"rendered":"https:\/\/nsrd.info\/blog\/?p=8026"},"modified":"2019-04-17T20:05:05","modified_gmt":"2019-04-17T10:05:05","slug":"basics-recovering-sql-databases-as-files-in-avamar","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2019\/04\/17\/basics-recovering-sql-databases-as-files-in-avamar\/","title":{"rendered":"Basics \u2013\u00a0Recovering SQL Databases as Files in Avamar"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In an earlier post this week, I walked through the process of executing a file level restore of a <a rel=\"noreferrer noopener\" aria-label=\"Microsoft SQL database using NetWorker (opens in a new tab)\" href=\"https:\/\/nsrd.info\/blog\/2019\/04\/16\/basics-recovering-microsoft-sql-server-databases-as-flat-files\/\" target=\"_blank\">Microsoft SQL database using NetWorker<\/a>. The databases had been backed up in the NetWorker module \u2013\u00a0and the recovery was done in the NetWorker module as well, but rather than recovering to a live, actual database, I recovered to a file, something SQL DBAs like to be able to do.<\/p>\n\n\n\n<p>So, with the SQL server setup, I wanted to go through the same process in Avamar. (This was a good opportunity for me to do some practice on Avamar command line options, too!) In this setup, I&#8217;m using Avamar 18.1, writing to a DDVE running DDOS 6.2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Recovering in the Avamar GUI<\/h2>\n\n\n\n<p>With the database successfully backed up in Avamar, I logged into the Avamar HTML5 UI and went to the Backup\/Recovery pane:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations-1024x591.png\" alt=\"\" class=\"wp-image-8029\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations-1024x591.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations-300x173.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations-768x443.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations-347x200.png 347w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/01-Avamar-Recovery-Operations.png 1303w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Accessing the Backup\/Restore Pane in Avamar<\/figcaption><\/figure>\n\n\n\n<p>Within the Backup\/Restore pane, I went across to Restore, and browsed down to my \/clients so I could select the SQL server, &#8216;win01&#8217;. This allowed me to then select the type of backup I wanted to recover from:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected-1024x458.png\" alt=\"\" class=\"wp-image-8030\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected-1024x458.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected-300x134.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected-768x343.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected-447x200.png 447w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Client-and-Backup-Type-Selected.png 1693w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Choosing the backup to recover from<\/figcaption><\/figure>\n\n\n\n<p>With the SQL backups selected, the next step was to drill down to the database I wanted to recover: <strong>TestDB<\/strong>:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected-1024x461.png\" alt=\"\" class=\"wp-image-8031\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected-1024x461.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected-300x135.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected-768x346.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected-444x200.png 444w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected.png 1693w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Choosing the Database to Recover<\/figcaption><\/figure>\n\n\n\n<p>Clicking Restore then allowed me to go through the recovery options dialog. First step of course is choosing where I want to recover to:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1-1024x592.png\" alt=\"\" class=\"wp-image-8032\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1-1024x592.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1-300x174.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1-768x444.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1-346x200.png 346w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-Options-1.png 1153w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Recovering Back to the Same Client<\/figcaption><\/figure>\n\n\n\n<p>After choosing the client to recover to, I clicked <strong>Next<\/strong>, where I could choose the recovery:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files-1024x592.png\" alt=\"\" class=\"wp-image-8033\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files-1024x592.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files-300x173.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files-768x444.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files-346x200.png 346w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Restore-to-Files.png 1157w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Choosing the Recovery Type<\/figcaption><\/figure>\n\n\n\n<p>You&#8217;ll note in the above that I&#8217;ve changed the restore type to &#8220;Restore SQL Server backup as files to the file system&#8221;, and I&#8217;d used the &#8220;Choose&#8230;&#8221; button to browse the client and select a recovery location, <strong>E:\\Temp<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1024x591.png\" alt=\"\" class=\"wp-image-8035\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1024x591.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-300x173.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-768x443.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-347x200.png 347w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary.png 1153w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"597\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen-1024x597.png\" alt=\"\" class=\"wp-image-8034\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen-1024x597.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen-300x175.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen-768x447.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen-343x200.png 343w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-More-Options-None-Chosen.png 1157w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> SQL Recovery More Options <\/figcaption><\/figure>\n\n\n\n<p>There&#8217;s a &#8220;More Options&#8221; panel in the recovery dialog, but I didn&#8217;t need to change anything there, so I just clicked <strong>Next<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1-1024x591.png\" alt=\"\" class=\"wp-image-8036\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1-1024x591.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1-300x173.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1-768x443.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1-347x200.png 347w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-Summary-1.png 1153w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Recovery Summary<\/figcaption><\/figure>\n\n\n\n<p>With the recovery details confirmed, I could click <strong>Finish<\/strong> to initiate the recovery. From that point, it was a case of jumping across to the <strong>Activity<\/strong> pane.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"220\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1024x220.png\" alt=\"\" class=\"wp-image-8037\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1024x220.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-300x65.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-768x165.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-929x200.png 929w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running.png 1696w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Recovery Running<br><\/figcaption><\/figure>\n\n\n\n<p>There&#8217;s the recovery running. (The recovery underneath was for a CLI recovery, which I&#8217;ll run through next.)<\/p>\n\n\n\n<p>I monitored the recovery in the activity pane until it was complete:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"222\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1024x222.png\" alt=\"\" class=\"wp-image-8038\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1024x222.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-300x65.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-768x167.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-921x200.png 921w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete.png 1694w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Recovery Complete<\/figcaption><\/figure>\n\n\n\n<p>With the recovery complete, I wanted to check out the restored files:<\/p>\n\n\n\n<p>Now, those restored files may look odd, but if you rename them to having a &#8220;.bak&#8221; at the end, SQL Management Studio will work with them. They&#8217;re basically created from the number of streams you run in the backup:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"512\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/10-Restored-Files.png\" alt=\"\" class=\"wp-image-8039\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/10-Restored-Files.png 980w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/10-Restored-Files-300x157.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/10-Restored-Files-768x401.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/10-Restored-Files-383x200.png 383w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><figcaption>Recovered SQL Files<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Recovering from the Command Line<\/h2>\n\n\n\n<p>So I wanted to do this from the command line like I&#8217;d do on NetWorker. So the first step was to list the backups that I had on the client. In this post, I&#8217;m using the MCUser account, but if you&#8217;re enabling your SQL DBAs to do these sorts of recoveries, you&#8217;ll have setup an account for them to use in Avamar.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Users\\Administrator><strong>avtar --backups --id=MCUser --account=\/clients\/win01<\/strong><br> avtar Info &lt;5551>: Command Line: avtar --backups --id=MCUser --account=\/clients\/win01<br> avtar Info &lt;7977>: Starting at 2019-04-17 17:08:29 AUS Eastern Standard Time [avtar Jun 13 2018 17:36:50 18.1.100-33 Windows Server 2016 Standard Evaluation Server Edition (No Service Pack) 64-bit-AMD64]<br> Password:<br> avtar Info &lt;6555>: Initializing connection<br> avtar Info &lt;5552>: Connecting to Avamar Server (kronos.turbamentis.int)<br> avtar Info &lt;5554>: Connecting to one node in each datacenter<br> avtar Info &lt;5583>: Login User: \"MCUser\", Domain: \"default\", Account: \"\/clients\/win01\"<br> avtar Info &lt;5580>: Logging in on connection 0 (server 0)<br> avtar Info &lt;5582>: Avamar Server login successful<br> avtar Info &lt;10632>: Using Client-ID='470d5398dd1febe114c90b2d1911378ceb87fed7'<br> avtar Info &lt;5550>: Successfully logged into Avamar Server [18.1.0-33]<br> avtar Info &lt;7377>: Backups for \/clients\/win01 as of 2019-04-17 17:08:33 AUS Eastern Standard Time<br>     Date      Time    Seq       Label           Size     Plugin    Working directory         Targets<br> <br> 2019-04-17 14:47:32     9 SQL Backup-1555476266562#0    3184769K SQL      \\?\\C:\\Program Files\\avs\\var                 <br>  2019-04-17 07:59:26     1 Windows-1555448593268   54588708K Windows  C:\\Program Files\\avs\\var<br> avtar Info &lt;5314>: Command completed (exit code 0: success)<\/pre>\n\n\n\n<p>This let me identify the backup I wanted to use \u2013\u00a0&#8220;SQL Backup-1555476266562#0&#8221;. The next step is to list that backup so I could confirm the database was inside there:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">E:\\><strong>avtar --list --id=MCUser --label=\"SQL Backup-1555476266562#0\" --account=\/clients\/win01<\/strong><br> avtar Info &lt;5551>: Command Line: avtar --list --id=MCUser --label=\"SQL Backup-1555476266562#0\" --account=\/clients\/win01<br> avtar Info &lt;7977>: Starting at 2019-04-17 19:38:58 AUS Eastern Standard Time [avtar Jun 13 2018 17:36:50 18.1.100-33 Windows Server 2016 Standard Evaluation Server Edition (No Service Pack) 64-bit-AMD64]<br> Password:<br> avtar Info &lt;6555>: Initializing connection<br> avtar Info &lt;5552>: Connecting to Avamar Server (kronos.turbamentis.int)<br> avtar Info &lt;5554>: Connecting to one node in each datacenter<br> avtar Info &lt;5583>: Login User: \"MCUser\", Domain: \"default\", Account: \"\/clients\/win01\"<br> avtar Info &lt;5580>: Logging in on connection 0 (server 0)<br> avtar Info &lt;5582>: Avamar Server login successful<br> avtar Info &lt;10632>: Using Client-ID='470d5398dd1febe114c90b2d1911378ceb87fed7'<br> avtar Info &lt;5550>: Successfully logged into Avamar Server [18.1.0-33]<br> avtar Info &lt;8745>: Backup from Windows Server 2016 Standard Evaluation Server Edition (No Service Pack) 64-bit host \"\/clients\/win01\" (win01) with plugin 3006 - Windows SQL<br> avtar Info &lt;5538>: Backup #9 label \"SQL Backup-1555476266562#0\" timestamp 2019-04-17 14:47:32 AUS Eastern Standard Time, 0 files, 3.037 GB<br> avtar Info &lt;40113>: Backup #9 created by avtar version 18.1.100-33<br> (local)\\<br> (local)\\TestDB\\<br> (local)\\TestDB\\f-0.TestDB.stream1<br> (local)\\TestDB\\f-0.TestDB.stream0<br> (local)\\ReportServerTempDB\\<br> (local)\\ReportServerTempDB\\f-0.ReportServerTempDB.stream0<br> (local)\\ReportServer\\<br> (local)\\ReportServer\\f-0.ReportServer.stream0<br> (local)\\model\\<br> (local)\\model\\f-0.model.stream0<br> (local)\\msdb\\<br> (local)\\msdb\\f-0.msdb.stream0<br> (local)\\master\\<br> (local)\\master\\f-0.master.stream0<br> avtar Info &lt;5314>: Command completed (exit code 0: success)<\/pre>\n\n\n\n<p>Now, the next step was to run the recovery. That&#8217;s with the <strong>avsql<\/strong> command, which is documented very completely within the Avamar SQL Client guide.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Users\\Administrator><strong>avsql --operation=restore --id=MCUser --ap=<em>SuperSecretPassword<\/em> --logtail=false --account=\/clients\/win01 --label=\"SQL Backup-1555476266562#0\" --redirecttofile=true --target=C:\\temp (local)\/TestDB --log=C:\\Temp\\recovery.log<br><\/strong> avsql Info &lt;5008>: Logging to C:\\Temp\\recovery.log<br> avsql Info &lt;6673>: CTL listening on port 64004<br> avsql Info &lt;12592>: Sending adhoc request to the MCS<br> avsql Info &lt;10684>: Setting ctl message version to 3 (from 1)<br> avsql Info &lt;16136>: Setting ctl max message size to 268435456<br> avsql Info &lt;17376>: Working on stand alone environment.<br> avsql Info &lt;7838>: - Adding user exclude \"<em>\/tempdb\" avsql Info &lt;16262>: Setting up labelnum: (9) for given label: (SQL Backup-1555476266562#0) avsql Info &lt;9552>: Spawning 'C:\\Program Files\\avs\\bin\\avtar' (avtar --case_sensitive=\"false\" --max-streams=\"1\" --ctlcallport=\"64004\" --ctlinterface=\"3006-COD-1555489492579\" --check-stdin-path=\"false\" --logfile=\"C:\\Program Files\\avs\\var\\COD-1555489492579#1-3006-SQL.avtar.log\" --vardir=\"C:\\Program Files\\avs\\var\" --bindir=\"C:\\Program Files\\avs\\bin\" --sysdir=\"C:\\Program Files\\avs\\etc\" --acnt=\"\/clients\/win01\" --id=\"MCUser\" --ap=\"<strong>\" --server=\"kronos.turbamentis.int\") avsql Info &lt;6686>: Process 5292 (C:\\Program Files\\avs\\bin\\avtar) for workorder COD-1555489492579#1 started avsql Info &lt;7732>: Waiting for avtar to finish avtar Info &lt;5008>: Logging to C:\\Program Files\\avs\\var\\COD-1555489492579#1-3006-SQL.avtar.log avtar Info &lt;5551>: Command Line: avtar --case_sensitive=false --max-streams=1 --ctlcallport=64004 --ctlinterface=3006-COD-1555489492579 --check-stdin-path=false --logfile=\"C:\\Program Files\\avs\\var\\COD-1555489492579#1-3006-SQL.avtar.log\" --vardir=\"C:\\Program Files\\avs\\var\" --bindir=\"C:\\Program Files\\avs\\bin\" --sysdir=\"C:\\Program Files\\avs\\etc\" --account=\/clients\/win01 --id=MCUser --password=<\/strong><\/em><strong><em>*<\/em><\/strong> --server=kronos.turbamentis.int --ctlusessl=true<br> avtar Info &lt;7977>: Starting at 2019-04-17 18:25:03 AUS Eastern Standard Time [avtar Jun 13 2018 17:36:50 18.1.100-33 Windows Server 2016 Standard Evaluation Server Edition (No Service Pack) 64-bit-AMD64]<br> avsql Info &lt;10684>: Setting ctl message version to 3 (from 1)<br> avtar Info &lt;10684>: Setting ctl message version to 3 (from 1)<br> avsql Info &lt;16136>: Setting ctl max message size to 268435456<br> avtar Info &lt;16136>: Setting ctl max message size to 268435456<br> avtar Info &lt;6767>: Successfully connected to 127.0.0.1:64004<br> avtar Info &lt;5900>: Workorder received:<br>                     <br>                                      \u00a8C9C      \u00a8C22C   \u00a8C23C <br> avtar Info &lt;18776>: Restore target is Win2012 - initializing WSS SIS Manager.<br> avtar Info &lt;8474>: - Log file path: C:\\Program Files\\avs\\var\\COD-1555489492579#1-3006-SQL.avtar.log<br> avtar Info &lt;6555>: Initializing connection<br> avtar Info &lt;5552>: Connecting to Avamar Server (kronos.turbamentis.int)<br> avtar Info &lt;5554>: Connecting to one node in each datacenter<br> avtar Info &lt;5993>: - Connect: Connected to 192.168.100.39:29000, Priv=0, SSL Cipher=ECDHE-RSA-AES256-GCM-SHA384<br> avtar Info &lt;5993>: - Datacenter 0 has 1 nodes: Connected to 192.168.100.39:29000, Priv=0, SSL Cipher=ECDHE-RSA-AES256-GCM-SHA384<br> avtar Info &lt;5583>: Login User: \"MCUser\", Domain: \"default\", Account: \"\/clients\/win01\"<br> avtar Info &lt;5580>: Logging in on connection 0 (server 0)<br> avtar Info &lt;5582>: Avamar Server login successful<br> avtar Info &lt;5018>: - Session ID: 0<br> avtar Info &lt;10632>: Using Client-ID='470d5398dd1febe114c90b2d1911378ceb87fed7'<br> avtar Info &lt;5550>: Successfully logged into Avamar Server [18.1.0-33]<br> avtar Info &lt;5295>: Starting restore at 2019-04-17 18:25:04 AUS Eastern Standard Time as \"WIN01\\Administrator\" on \"win01\" (2 CPUs) [18.1.100-33]<br> avtar Info &lt;19114>: --restoreshortnames flag not specified; 8.3 names (if available in the backup) will not be restored with files\/dirs. If the target OS supports 8.3 names, then the OS will create 8.3 names automatically.<br> avtar Info &lt;10534>: Initializing session on Data Domain: 1, mode:RESTORE, boost:ENABLED, compressed-restore:disabled, max-streams:1, pool-size:67108864, queue-size:6, read-size:131072<br> avtar Info &lt;10535>: - DDR naming options: Filenames: UNIQUE, ClientID:CID, BackupID:HEX-TIME, Avamar Server Name:DPNID<br> avtar Info &lt;16684>: - Data Domain Engine (3.4.2.0 build 593989)<br> avtar Info &lt;40174>: Multi-stream restore via cloning is enabled.<br> avtar Info &lt;10632>: Using Client-ID='470d5398dd1febe114c90b2d1911378ceb87fed7'<br> avtar Info &lt;40062>: GSAN connected via: IPv4, retrieved Data Domain IPv4 hostname = singularity.turbamentis.int<br> avtar Info &lt;10539>: Connecting to Data Domain Server \"singularity.turbamentis.int\"(1)  (LSU: avamar-1516143927, User: \"\")<br> avtar Info &lt;10540>: - Resolved Data Domain Server name \"singularity.turbamentis.int\" to the IP address \"192.168.100.249\"<br> avtar Info &lt;41234>: - Connecting to Data Domain Server name \"singularity.turbamentis.int\" with credentials<br> avtar Info &lt;19156>: - Establishing a connection to the Data Domain system with encryption (Connection mode: A:3 E:2).<br> avtar Info &lt;43204>: - Connected to:<br> Data Domain System: singularity.turbamentis.int<br> Model:              DD VE Version 4.0<br> DDOS:               Data Domain OS 6.2.0.5-608869<br> Serial Number:      AUDV77VJJYAMZU<br>           Capacity<br> Total:        384,428,408,832 (358.03 GB)<br> Available:    328,593,309,696 (306.03 GB)<br> Used:         55,835,099,136 (52.000 GB)<br> Used logical: 674,935,967,197 (628.58 GB)<br> avtar Info &lt;41435>: - Data Domain configured in Stand-Alone mode.<br> avtar Info &lt;40206>: Setting default storage unit to 'avamar-1516143927' for handle 1<br> avtar Info &lt;41440>: Data Domain handle:1 capabilities:0x0820021B<br> avtar Info &lt;10543>: Data Domain login to singularity.turbamentis.int successful<br> avtar Info &lt;18845>: Restore mode - No Data Domain read compression.<br> avtar Info &lt;19156>: - Establishing a connection to the Data Domain system with encryption (Connection mode: A:3 E:2).<br> avtar Info &lt;41359>: Backup #9 had been created by avtar version 18.1.100-33 as plugin 3006-SQL<br> avtar Info &lt;5949>: Backup file system character encoding is 65001 (UTF-8).<br> avtar Info &lt;8745>: Backup from Windows Server 2016 Standard Evaluation Server Edition (No Service Pack) 64-bit host \"\/clients\/win01\" (win01) with plugin 3006 - Windows SQL<br> avtar Info &lt;5538>: Backup #9 label \"SQL Backup-1555476266562#0\" timestamp 2019-04-17 14:47:32 AUS Eastern Standard Time, 0 files, 3.037 GB<br> avtar Info &lt;17991>: Attempting to restore sis.hs file. If successful, then backup was done on a Windows Storage Server with Windows SIS feature enabled.<br> avtar Warning &lt;17990>: File 'sis.hs' could not be restored. If backup contains SIS links they will not be converted to regular files and will not be accessible. Otherwise, backup was done on a non-SIS enabled system and this warning message can be safely ignored.<br> avtar Info &lt;5291>: Estimated size for \"(local)\\TestDB\\f-0.TestDB.stream0\" is 1.425 GB<br> avtar Warning &lt;19107>: Unable to determine if there is enough disk space for the specified restore.<br> avtar Info &lt;7324>: Volume Type for \"C:\\\" is \"NTFS\", Supports Compression=1, Encryption=1, ACLS=1, DataStreams=1, Reparse=1, Sparse=1, Hardlinks=1<br> avtar Info &lt;5260>: Restoring files from \"(local)\\TestDB\\f-0.TestDB.stream0\" to directory \"C:\\temp(local)\\TestDB\".<br> avtar Info &lt;18076>: Opening DD stored file system container 1 in \/cur\/470d5398dd1febe114c90b2d1911378ceb87fed7\/1D4F4D8AB21902C for restore operation, using pre-fetched ddr_files.xml.<br> avtar Info &lt;15265>: Opening file system container \/cur\/470d5398dd1febe114c90b2d1911378ceb87fed7\/1D4F4D8AB21902C\/\/cur\/470d5398dd1febe114c90b2d1911378ceb87fed7\/1D4F4D8AB21902C\/container.1.cdsf for restore.<br> avtar Info &lt;5267>: Restore of \"(local)\\TestDB\\f-0.TestDB.stream0\" completed<br> avtar Info &lt;17991>: Attempting to restore sis.hs file. If successful, then backup was done on a Windows Storage Server with Windows SIS feature enabled.<br> avtar Warning &lt;17990>: File 'sis.hs' could not be restored. If backup contains SIS links they will not be converted to regular files and will not be accessible. Otherwise, backup was done on a non-SIS enabled system and this warning message can be safely ignored.<br> avtar Info &lt;5291>: Estimated size for \"(local)\\TestDB\\f-0.TestDB.stream1\" is 1.570 GB<br> avtar Warning &lt;19107>: Unable to determine if there is enough disk space for the specified restore.<br> avtar Info &lt;5260>: Restoring files from \"(local)\\TestDB\\f-0.TestDB.stream1\" to directory \"C:\\temp(local)\\TestDB\".<br> avtar Info &lt;5267>: Restore of \"(local)\\TestDB\\f-0.TestDB.stream1\" completed<br> avtar Info &lt;7925>: Restored 2.995 GB from selection(s) with 2.995 GB in 2 files<br> avtar Info &lt;6090>: Restored 2.995 GB in 1.64 minutes: 109.8 GB\/hour (73 files\/hour)<br> avtar Info &lt;7883>: Finished at 2019-04-17 18:26:40 AUS Eastern Standard Time, Elapsed time: 0000h:01m:38s<br> avtar Info &lt;40176>: - Multi-stream restore summary (current 0, max active 1, max cloned 0, total cloned 0, ddr handle 1):<br> avtar Info &lt;40178>: -    1 - \/cur\/470d5398dd1febe114c90b2d1911378ceb87fed7\/1D4F4D8AB21902C\/container.1.cdsf<br> avtar Info &lt;8468>: Sending wrapup message to parent<br> avtar Info &lt;5314>: Command completed (4 warnings, exit code 0: success)<br> avsql Info &lt;6688>: Process 5292 (C:\\Program Files\\avs\\bin\\avtar) finished (code 0: success)<br> avsql Info &lt;14302>: Redirected restore of selected database to files on location C:\\temp succesfully completed.<br> avsql Info &lt;42977>: Final summary generated subwork 1, cancelled\/aborted 0, promoted to full 0, snapview 1, exitcode 0<br> avsql Info &lt;6451>: avsql returning with exitcode 0<\/pre>\n\n\n\n<p>Now, as I&#8217;d mentioned in the GUI version of the recovery, the stream files you recover are effectively SQL Server .bak files, you just need to rename them. I wanted to actually show the import into SQL Server Management Studio, so the next step was to rename the files:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"513\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Rename-Stream-Files-to-BAK.png\" alt=\"\" class=\"wp-image-8043\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Rename-Stream-Files-to-BAK.png 979w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Rename-Stream-Files-to-BAK-300x157.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Rename-Stream-Files-to-BAK-768x402.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/02-Rename-Stream-Files-to-BAK-382x200.png 382w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><figcaption>Renaming the stream files to .BAK<\/figcaption><\/figure>\n\n\n\n<p>Right! With that done, time to go into SSMS and execute a database recovery. (Don&#8217;t forget, we could have recovered directly to a database, but in this case we&#8217;re working on the basis of say, the database files being recovered and shipped off to another server that&#8217;s not immediately accessible to the environment, or any other purpose the DBAs want.)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"458\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Restore-Database-in-SSMS.png\" alt=\"\" class=\"wp-image-8044\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Restore-Database-in-SSMS.png 614w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Restore-Database-in-SSMS-300x224.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Restore-Database-in-SSMS-268x200.png 268w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><figcaption>Starting a database restore in SSMS<\/figcaption><\/figure>\n\n\n\n<p>When we start a database restore from previously recovered flat files, we&#8217;ll change the source to <strong>Device<\/strong> so we can add files:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"760\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-from-Device.png\" alt=\"\" class=\"wp-image-8045\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-from-Device.png 875w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-from-Device-300x261.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-from-Device-768x667.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/04-Restore-from-Device-230x200.png 230w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><figcaption>Changing the database recovery type in SSMS<\/figcaption><\/figure>\n\n\n\n<p>By clicking the &#8220;&#8230;&#8221; option, I could choose the files I wanted to recover from:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"467\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Select-Files-to-Add.png\" alt=\"\" class=\"wp-image-8046\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Select-Files-to-Add.png 635w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Select-Files-to-Add-300x221.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/05-Select-Files-to-Add-272x200.png 272w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><figcaption>Avamar recovered files selected<\/figcaption><\/figure>\n\n\n\n<p>Clicking OK showed the chosen files:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"494\" height=\"367\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-Files-Added.png\" alt=\"\" class=\"wp-image-8047\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-Files-Added.png 494w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-Files-Added-300x223.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/06-Files-Added-269x200.png 269w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><figcaption>They were all the files I needed, so I clicked OK to progress with the recovery<\/figcaption><\/figure>\n\n\n\n<p>The next step was to set the name of the database I wanted to create via the recovery:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"747\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-to-Alternate-Database.png\" alt=\"\" class=\"wp-image-8048\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-to-Alternate-Database.png 864w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-to-Alternate-Database-300x259.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-to-Alternate-Database-768x664.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/07-Restore-to-Alternate-Database-231x200.png 231w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><figcaption>Ready to run the Recovery<\/figcaption><\/figure>\n\n\n\n<p>SSMS gives you a progress as it&#8217;s recovering from those flat files:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"748\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1.png\" alt=\"\" class=\"wp-image-8049\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1.png 864w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1-300x260.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1-768x665.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/08-Restore-Running-1-231x200.png 231w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><figcaption>Recovery in Progress<\/figcaption><\/figure>\n\n\n\n<p>And finally, our recovered database:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"867\" height=\"753\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1.png\" alt=\"\" class=\"wp-image-8050\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1.png 867w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1-300x261.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1-768x667.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/09-Restore-Complete-1-230x200.png 230w\" sizes=\"auto, (max-width: 867px) 100vw, 867px\" \/><figcaption>Import Complete!<\/figcaption><\/figure>\n\n\n\n<p>And that&#8217;s it \u2013\u00a0recovering SQL databases into flat files out of Avamar, from the GUI and from the command line \u2013\u00a0and even importing the recovered flat files into SQL Server Management Studio.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In an earlier post this week, I walked through the process of executing a file level restore of a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":8031,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1154,9,19],"tags":[1519,1486,1367,1518],"class_list":["post-8026","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-avamar-2","category-databases","category-recovery","tag-avsql","tag-avtar","tag-sql-server","tag-ssms"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/04\/03-Database-Selected.png","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-25s","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=8026"}],"version-history":[{"count":5,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8026\/revisions"}],"predecessor-version":[{"id":8051,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8026\/revisions\/8051"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media\/8031"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=8026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=8026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=8026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}