36 fbUnique(
getClient().getUtil()->getXpbBuilder(&statusWrapper, fb::IXpbBuilder::SPB_START,
nullptr, 0));
37 builder->insertTag(&statusWrapper, isc_action_svc_backup);
38 builder->insertString(&statusWrapper, isc_spb_dbname, options.
getDatabase().c_str());
42 builder->insertString(&statusWrapper, isc_spb_bkp_file, backupFile.path.c_str());
44 if (backupFile.length)
45 addSpbInt(builder.get(), &statusWrapper, isc_spb_bkp_length, *backupFile.length,
"Backup file length");
49 builder->insertTag(&statusWrapper, isc_spb_verbose);
52 builder->insertInt(&statusWrapper, isc_spb_bkp_parallel_workers,
static_cast<int>(*parallelWorkers));
54 const auto buffer = builder->getBuffer(&statusWrapper);
55 const auto length = builder->getBufferLength(&statusWrapper);
57 startAction(std::vector<std::uint8_t>(buffer, buffer + length));
65 fbUnique(
getClient().getUtil()->getXpbBuilder(&statusWrapper, fb::IXpbBuilder::SPB_START,
nullptr, 0));
66 builder->insertTag(&statusWrapper, isc_action_svc_restore);
70 builder->insertString(&statusWrapper, isc_spb_dbname, databaseFile.path.c_str());
72 if (databaseFile.length)
73 addSpbInt(builder.get(), &statusWrapper, isc_spb_res_length, *databaseFile.length,
"Database file length");
77 builder->insertString(&statusWrapper, isc_spb_bkp_file, backupFile.c_str());
80 &statusWrapper, isc_spb_options, options.
getReplace() ? isc_spb_res_replace : isc_spb_res_create);
83 builder->insertTag(&statusWrapper, isc_spb_verbose);
86 builder->insertInt(&statusWrapper, isc_spb_res_parallel_workers,
static_cast<int>(*parallelWorkers));
90 std::uint8_t modeVal = 0;
94 modeVal = isc_spb_res_rm_none;
97 modeVal = isc_spb_res_rm_readonly;
100 modeVal = isc_spb_res_rm_readwrite;
106 builder->insertBytes(&statusWrapper, isc_spb_res_replica_mode, &modeVal, 1u);
109 const auto buffer = builder->getBuffer(&statusWrapper);
110 const auto length = builder->getBufferLength(&statusWrapper);
112 startAction(std::vector<std::uint8_t>(buffer, buffer + length));