I had some trouble with Veeam because it closed a WORM tape media set and created a new one, which I did not want.
Using standard tapes such a behavior is annoying, but using WORM tape this behavoir directly costs lot of money and can easily happen again when a person inserts a wrong tape in standalone drive and backup-to-tape-job starts.
I searched a lot on the web but could not find a solution to 're-open' a closed media set.
I did research on this topic myself and found a way, which for me perfectly worked. However this is not offically documented and your doing the following steps on your own risk without having any guarantee it will work for you. This method here was not provided by veeam support so one more reason to be very careful what you are doing:
I) PEPARATION
Ensure that in case of a standalone drive Veeam only asked for a new tape because a new media set was started. Important is that this requested tape was never loaded and no following job was processed. If you already loaded a new tape and started a job with the new tape, the following process might result in incostistent backups which you might not be able to restore!
II) OPERATION
Step 0)
On your Backup-Host where Veeam is installed open 'regedit' and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication
Here you can find the database name of SQL-Instance and database VEEAM uses.
Now open SQL management Studio or similar to connect to database.
Step 1) Disable all jobs in Veeam BR
We don't want Veeam to perform any job while we ware manipulaton its database later!
Step 2) Backup database
Perform a backup of Veeam database using SQL Management Studio. If anything goes wrong you will be able to read it back later.
For doing so it is important the database is not changed by Veeam itself inbetween. Therefore don't skip "step 1", because each run of a job would change the database. If the you restored the backup database later you end up in an inconstistend state of what's on disk/tape and what Veeam knows about it.
Step 3)
Show all media sets you are using in Veeam
Code: Select all
SELECT * FROM [VeeamBackup].[dbo].[Tape.media_families]
For both note the "id", be sure not to mix them up.
In the example I'll use 123 for media set to open, and 456 for the one which was created but I did not want to.
Step 4.1) Open the closed media set
(In following statements I use "rollback" to test operation, feel free to change "rollback" to "commit" after you verified results! Only then the changed take effect permanently in database)
Code: Select all
begin transaction
update [VeeamBackup].[dbo].[Tape.media_families]
set is_closed=0
where id='123'
/* Show results of changes which were made */
SELECT * FROM [VeeamBackup].[dbo].[Tape.media_families]
rollback /* commit*/
Code: Select all
begin transaction
delete from [VeeamBackup].[dbo].[Tape.media_families]
where id='456'
/* Show results of changes which were made */
SELECT * FROM [VeeamBackup].[dbo].[Tape.media_families]
rollback /* commit*/
Show all media which are introduced to Veeam
Code: Select all
SELECT * FROM [VeeamBackup].[dbo].[Tape.tape_mediums]
Code: Select all
begin transaction
update [VeeamBackup].[dbo].[Tape.tape_mediums]
set continuation ='1'
where id='789'
rollback /* commit*/
- the unwanted new media set is deleted
- the 'old' media set is open again
- the medium you orignially wanted to insert and use but you did not by a mistake is arked a open for append
Since this here is not documented and the result of deep investigation in Veeam database (not recommended) please test the whole backup chain(s) if the data is consistent. In my case it worked fine, I can restore and append data and did not need to buy new WORM tape for lot of money.
I am interested in your experience so please let me know your thoughts and results or even modifications.