r/Veeam • • 4d ago

Difference between a BCO-file and a DB-dump

Hello fellow Veeam'rs,

As someone once said; "there are no stupid questions" I'm kind of feeling embarrassed right now.

I've actually got two questions and they are probably indirectly the same.

Could someone please tell me:

- What the difference is between a BCO-file and a DB-dump (created while the Veeam services are all stopped)?

- If a BCO-file is being used for importing the previous state, does it recreate the database (aka, drop database; create database; insert data)?

The reason for asking this, is because I've many times imported a DB-dump (including the Veeam reg keys containing the salts and hashes) and the VBR just worked flawlessly afterwards.

Bonus question: what kind of information does the BCO-file -not- store?

My apologies for such a ridiculous post (knowing that I've been a VMCE for many years....)

2 Upvotes

3 comments sorted by

2

u/tdic89 4d ago

As far as I know, the BCO file also contains version information and the restore process will account for that because it’s the actual app doing it.

Doing a database restore means you’re simply throwing the data back into the database as it was, which is probably fine if the version you’re running is identical. If not, hypothetically you could end up with a number of strange issues which are very difficult to fix.

If an app has a way to backup and restore data, I’d always suggest using that in the first instance as it will likely account for any database migrations between different versions.

2

u/ToilLess_Dev 4d ago

Hello McLovinAllNightLong,

not a stupid question at all; the two look similar from the outside but work differently.

A DB dump is the raw database. It only works if you restore it into the same VBR version on the same database engine, plus the registry bits you already mentioned. You've been doing exactly that, which is why it worked.

The .bco is an export of VBR's configuration data. You restore it through the Configuration Restore wizard, not SQL. The wizard writes the data into a new or existing database (an existing one gets overwritten), and it can do things a dump can't: restore into a newer VBR build, or move between MS SQL and PostgreSQL. Just not both at once; an engine migration only works within the same VBR version, so you'd upgrade first and then switch engines. At the end, the wizard also syncs backups and tape libraries, so the restore point chains in the database match what's actually in the repositories.

Bonus question: as far as I know, if the configuration backup isn't encrypted, it doesn't include the passwords for stored credentials, so you'd have to re-enter them after a restore. That's the main reason Veeam recommends always encrypting it. It also doesn't contain the backup files themselves or any custom registry tweaks you made on the server, so document those separately.

1

u/Distilled_Gaming Veeam Employee 4d ago

Bonus question: as far as I know, if the configuration backup isn't encrypted, it doesn't include the passwords for stored credentials, so you'd have to re-enter them after a restore. That's the main reason Veeam recommends always encrypting it. It also doesn't contain the backup files themselves or any custom registry tweaks you made on the server, so document those separately.

This is correct. Encrypting your BCO is important for making transferring the database to a new server, or recovering the state of a lost VBR because it doesn't require you to enter every single password for every single credential you had on the previous VBR. However, since an encrypted BCO does carry over passwords and other critically important encryption information, it's imperative that your encryption password for the BCO be secure enough to not be easily cracked and stored somewhere secure like a password manager in case you ever need it.

Because encryption is also tied to the server where VBR is stored, that's why if you create a DB dump and send it to Veeam Support for example, even by having the database in our hands we're unable to reverse out the plaintext passwords that are in there (in encrypted format, obviously). So, an encrypted BCO includes not just the encrypted passwords and credentials in the database, but also the private key information from the source VBR server needed to actually decrypt the credentials in the database.

I think it should go without saying that you should never let anyone you don't trust get their hands on an encrypted BCO and the password that goes with it. That includes Veeam Support ourselves. It's a legal nightmare if someone sends us an encrypted BCO and the password to decrypt it because if an engineer unknowingly uses them to restore the BCO into a lab for testing without realizing the potential consequences, and that lab server happens to have an outbound WAN connection, the likelihood for significant data loss is very high if that VBR environment included in that BCO has cloud repositories (AWS, Azure, GCP, etc.). That should never happen since we have strict policies on handling customer databases and also policies restricting any lab server with a database instance from having any WAN connection at all. But, it's best to never leave it up to policies to prevent disasters, haha.