We are backing up our Couchbase data using cbbackup. We would like to do some basic checking of our backup files as a sanity check.
I saw some info about doing an integrity check with sqlite3, e.g.:
sqlite3 -line bucketbackup.cbb "pragma integrity_check;"
integrity_check = ok
That looks good, BUT sqlite3 always returns OK/success every time, even if I supply it with a non-existent cbb file. Any ideas why this is? Is this a valid approach?
Also, is there a way to get the item counts of buckets from the .cbb’s? I’d like to to a (rough) comparison of whats expected in a given bucket in the live DB vs. what the backup took. We are on Couchbase Community Server 4.5.x…I see cbbackupmgr has some tools for that, but I don’t think community has it.
Actually, it looks like sqlite3 returns OK for non-existent .cbb files because it will actually create the .cbb file if one does not exist, and then it checks integrity on the empty DB and thus it comes back as OK.
If anyone can help me with the other part of the question, that would be much appreciated!:
Also, is there a way to get the item counts of buckets from the .cbb’s? I’d like to to a (rough) comparison of whats expected in a given bucket in the live DB vs. what the backup took. We are on Couchbase Community Server 4.5.x…I see cbbackupmgr has some tools for that, but I don’t think community has it.