Need some advice about hot backup under linux
545480Nov 15 2006 — edited Nov 17 2006hi, I want some advice about db files hot backup between two machines(Named A and B).A is primary machine which will write and read database and have the lastest db file. B is backup role and no database file in it.
Now I want hot backup A's db file to B in order to B have the lastest db file too.
At A,my db file support transaction and environment, and I set autoremove unnecessary log files.
The code such as follows:
dbenv->set_flags(dbenv, DB_AUTO_COMMIT |DB_LOG_AUTOREMOVE | DB_TXN_WRITE_NOSYNC, 1);
ret = dbenv->open(dbenv, NULL,
DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN ,0)
I don't want to use db_hotbackup utility. and db_hotbackup may be backup files to the same machine with different dir.
How can I make machine A's db files backup to machine B.
Thanks for your help.
Best Regards
hangsy