Skip to main content
Solved

Tape marked as free


Forum|alt.badge.img+1
  • Influencer
  • 77 comments

I have a few questions concerning tape backups and marking an expired tape as free.  I have marked 2 months of tapes free, but the Postgres SQL database hasn’t reduced in size.  What other cleanup do I need to do on the Postgres side?

VBR ver 12.2

What happens when you mark a tape as free

  •  What happens in the postgres database
  • Does Veeam remove all indexing data related to the backups when a tape is marked as free ? I have marked 2 months of tapes free, but the Postgres SQL database hasn’t reduced in size. 

Best answer by ddomask

When marking a tape as free it is removed from the catalog to be used again.  But seems that it is better to move it to the Free pool. 

@Chris.Childerhose Same operation basically. Both will start a Remove from Catalog operation where we clean up the tape catalog entries on the DB, so in effect there’s no difference. (Hint: you can re-catalog a tape that was marked as free/moved to free BEFORE it is written to again, and you will re-import the backups on that tape)

 

@dloseke is correct here, deleting entries from an SQL database does not decrease the size of the database. It’s best to think of a database as a container for your SQL data; as more space is needed, the container allocates more pages which result in more physical disk space being used. It’s easy to allocate new space, but shrinking requires a lot of work because SQL organizes the data in an optimized way -- just deleting data requires a lot of planning from the SQL engine to ensure it doesn’t make performance worse, and it’s usually a dedicated operation. Similarly, this will result in indices being rebuilt which can be very expensive CPU wise (read: CPU spikes, performance issues)

So you can “reclaim” space in that individual pages that aren’t needed anymore are deleted from the container, but the container remains the same size, just it now has more free space than it did before.

@Nikks, is it just VM/Agent backups or are you also doing Unstructured Data (File/Object) to tape? I would not expect huge space savings with VM/Agent backup to tape, but File/Object to tape is very expensive space wise in the DB so I can get why you want to reclaim space, but this can be a tricky operation. I would honestly suggest schedule a maintenance window after you have done a substantial amount of tape “mark as free”, and during the maintenance window, take a fresh configuration backup, then restore the configuration backup to a NEW database on the same server. Test it and make sure all looks good and works, and if so, you can delete the original database. This would basically rebuild the configuration database anew and effectively shrink it as only necessary space will be allocated.

 

View original
Did this topic help you find an answer to your question?

10 comments

Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8402 comments
  • February 17, 2025

When marking a tape as free it is removed from the catalog to be used again.  But seems that it is better to move it to the Free pool.  See here - https://helpcenter.veeam.com/docs/backup/vsphere/marking_tapes_as_free.html?ver=120


Dynamic
Forum|alt.badge.img+8
  • Influencer
  • 361 comments
  • February 17, 2025

Hey Nikks,

according to Marking Tapes as Free - User Guide for VMware vSphere the Tape itself will be marked as free. Data on the Tape itself stay intact (if no Data is written on it) - you could also re-inventory / catalog it.

Regards to the Postgres itself, i’m not sure about it, maybe someone else can help with an info about it.

Best, Markus

 

EDIT: omChris… faster than light...

 


Forum|alt.badge.img+1
  • Author
  • Influencer
  • 77 comments
  • February 17, 2025
Dynamic wrote:

Hey Nikks,

according to Marking Tapes as Free - User Guide for VMware vSphere the Tape itself will be marked as free. Data on the Tape itself stay intact (if no Data is written on it) - you could also re-inventory / catalog it.

Regards to the Postgres itself, i’m not sure about it, maybe someone else can help with an info about it.

Best, Markus

 

EDIT: omChris… faster than light...

 

Thanks Dynamics


Forum|alt.badge.img+1
  • Author
  • Influencer
  • 77 comments
  • February 17, 2025
Chris.Childerhose wrote:

When marking a tape as free it is removed from the catalog to be used again.  But seems that it is better to move it to the Free pool.  See here - https://helpcenter.veeam.com/docs/backup/vsphere/marking_tapes_as_free.html?ver=120

Thanks Chris. 

Postgres SQL database hasn’t reduced in size.  What other cleanup do I need to do on the Postgres side? Can we use the VACUUM, ANALYZE, and REINDEX commands on a PostgreSQL database?


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8402 comments
  • February 17, 2025
Nikks wrote:
Chris.Childerhose wrote:

When marking a tape as free it is removed from the catalog to be used again.  But seems that it is better to move it to the Free pool.  See here - https://helpcenter.veeam.com/docs/backup/vsphere/marking_tapes_as_free.html?ver=120

Thanks Chris. 

Postgres SQL database hasn’t reduced in size.  What other cleanup do I need to do on the Postgres side? Can we use the VACUUM, ANALYZE, and REINDEX commands on a PostgreSQL database?

No idea on that one as I am sure Veeam does background processing at some point.  I would not do anything without Support involvement at this point.


dloseke
Forum|alt.badge.img+7
  • On the path to Greatness
  • 1447 comments
  • February 18, 2025

I’m not very knowledgable about Postgres, but I would generally be surprised if the database got smaller.  I know this is apples and oranges, but based on my previous experience with MSSQL and Exchange Databases, when data is removed from the database, it doesn’t actually shrink the database but instead creates whitespace within the database.  To shrink the actually database size, you have to manually run commands to shrink it but often this isn’t recommended.  Again, this may or may not apply to Postgres, but if you were set on trying to reduce the size of the database, I’d look into that process to see if it creates whitespace and if that whitespace can be reclaimed.  But I also don’t know enough about the mechanics of how Veeam manages tape data within the database and if there is information that is purged when a tape is marked as free.  I too would recommend contacting support to get their view on this as they’re going to better know what is going on inside of that database when you’re taking actions like this and if there would be the possibility of the outcome you’re expecting.


Forum|alt.badge.img+3
  • Comes here often
  • 106 comments
  • Answer
  • February 19, 2025

When marking a tape as free it is removed from the catalog to be used again.  But seems that it is better to move it to the Free pool. 

@Chris.Childerhose Same operation basically. Both will start a Remove from Catalog operation where we clean up the tape catalog entries on the DB, so in effect there’s no difference. (Hint: you can re-catalog a tape that was marked as free/moved to free BEFORE it is written to again, and you will re-import the backups on that tape)

 

@dloseke is correct here, deleting entries from an SQL database does not decrease the size of the database. It’s best to think of a database as a container for your SQL data; as more space is needed, the container allocates more pages which result in more physical disk space being used. It’s easy to allocate new space, but shrinking requires a lot of work because SQL organizes the data in an optimized way -- just deleting data requires a lot of planning from the SQL engine to ensure it doesn’t make performance worse, and it’s usually a dedicated operation. Similarly, this will result in indices being rebuilt which can be very expensive CPU wise (read: CPU spikes, performance issues)

So you can “reclaim” space in that individual pages that aren’t needed anymore are deleted from the container, but the container remains the same size, just it now has more free space than it did before.

@Nikks, is it just VM/Agent backups or are you also doing Unstructured Data (File/Object) to tape? I would not expect huge space savings with VM/Agent backup to tape, but File/Object to tape is very expensive space wise in the DB so I can get why you want to reclaim space, but this can be a tricky operation. I would honestly suggest schedule a maintenance window after you have done a substantial amount of tape “mark as free”, and during the maintenance window, take a fresh configuration backup, then restore the configuration backup to a NEW database on the same server. Test it and make sure all looks good and works, and if so, you can delete the original database. This would basically rebuild the configuration database anew and effectively shrink it as only necessary space will be allocated.

 


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8402 comments
  • February 19, 2025

Thanks for the clarity ​@ddomask (David)


dloseke
Forum|alt.badge.img+7
  • On the path to Greatness
  • 1447 comments
  • February 19, 2025

Thank you David ​@ddomask  for the clarification.  I figured it wasn’t terribly different on the database in Postgres vs MSSQL in this case, but I haven’t enough experience to know.  Great idea with the Configuration Database export/import process.


Scott
Forum|alt.badge.img+8
  • Veeam Legend
  • 993 comments
  • February 22, 2025

I have PB’s of tapes,  and 100’s if not in the 1000 range. 

Here are a few tips I have learnt over several years of Veeam Tape jobs. 

  1. There should be no need to move tapes out of media pools most of the time. Veeam will grab free tapes, and when they expire, that media pool gets used before it grabs new “free” tapes. After your weekly's expire, the weekly tapes get reused, same goes for monthly etc.  If you have jobs fail after half completing, you will eventually have too many expired tapes and may want to manually move them. 

 

  1. Marking tapes as free, or moving to the free pool does NOT erase any data on the tapes. It’s quick for now, and can be an absolute disaster at the worst possible time doing it this way. Lets say you are upgrading to the next version and have a serious issue. You will need to restore from your config backup on the new server. Veeam will go out and rescan everything including loading every tape. When it doesn’t have that information in the database it will import every tape showing them in their previous jobs. This can also take days or weeks depending on how many tapes you have.  

 

  1. Quick erase loads the tape, erases the header, then you can move them to free after that. If you ever need a rescan of your library for any reason, you will thank me. I do this 100% of the time now because I have had to rescan my library before and the above happened.

 

Looking at the above post, none will “shrink” your DB. 


Comment