Berkeley DB File Split

Our application uses berkeley db for temporary storage and preservation. A new problem has arisen when huge data comes from different input sources. Now the underlying file system does not support such large file sizes. In any case, to split Berkeley DB files into logical segments or partitions without losing data inside it. I also need it to set DB BERKLELE using the properties, and not cumbersome programming for this simple task.

+4
source share
2 answers

As far as I know, BDB does not support this for you. However, you can implement it yourself by creating several databases.

I have done this before with BDB, programmatically. Those. my code split a potentially large index file into separate files and created the main top-level index above these subfiles.

0
source

Modern BDB has the ability to add additional directories using either DB_CONFIG (recommended) or API calls.

See if these directives (and the corresponding API calls) help: add_data_dir set_create_dir set_data_dir set_lg_dir set_tmp_dir

Please note that adding these directives is unlikely to be transparent to β€œJust Work”, but it should not be too difficult to use db_dump / db_load to recreate the database files configured with these directives.

0
source

All Articles