I'm working through some backup processes and would just like to clarify my understanding of the values for zoid in the new_oid table.
To ensure that there are is no reuse of an OID the zoid value in new_oid should be at least:
max_existing = max(zoid) from object_state
zoid in new_oid >= (max_existing // 16) + 1 (this being due to the sqlite adaptor getting oids in a range 16 long)
My backup process at the moment is to use litestream (litestream.io backup to s3/gcp etc) on just main.sqlite3 then when restoring do a zodbconvert into the correct location. The end result of the zodbconvert meets the rules above but I just wanted to confirm so I can put a check in on the restore script.
I'm working through some backup processes and would just like to clarify my understanding of the values for zoid in the new_oid table.
To ensure that there are is no reuse of an OID the zoid value in new_oid should be at least:
max_existing = max(zoid) from object_state
zoid in new_oid >= (max_existing // 16) + 1 (this being due to the sqlite adaptor getting oids in a range 16 long)
My backup process at the moment is to use litestream (litestream.io backup to s3/gcp etc) on just main.sqlite3 then when restoring do a zodbconvert into the correct location. The end result of the zodbconvert meets the rules above but I just wanted to confirm so I can put a check in on the restore script.