static void JS_CreateHotbackup(
    v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);

  if (args.Length() != 1 || !args[0]->IsObject()) {
    TRI_V8_THROW_EXCEPTION_USAGE("createHotbackup(obj)");
  }
  VPackBuilder obj;
  try {
    TRI_V8ToVPack(isolate, obj, args[0], false, true);
  } catch (std::exception const& e) {
    TRI_V8_THROW_EXCEPTION_USAGE(
        std::string(
            "createHotbackup(obj): could not convert body to object: ") +
        e.what());
  }

  VPackBuilder result;
#if USE_ENTERPRISE
  TRI_GET_GLOBALS();
  HotBackup h(v8g->_server);
  auto r = h.execute("create", obj.slice(), result);
  if (r.fail()) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(r.errorNumber(), r.errorMessage());
  }
#else
  result.add(obj.slice());
#endif

  TRI_V8_RETURN(TRI_VPackToV8(isolate, result.slice()));
  TRI_V8_TRY_CATCH_END
}
static void JS_CreateHotbackup(
    v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);

  if (args.Length() != 1 || !args[0]->IsObject()) {
    TRI_V8_THROW_EXCEPTION_USAGE("createHotbackup(obj)");
  }
  VPackBuilder obj;
  try {
    TRI_V8ToVPack(isolate, obj, args[0], false, true);
  } catch (std::exception const& e) {
    TRI_V8_THROW_EXCEPTION_USAGE(
        std::string(
            "createHotbackup(obj): could not convert body to object: ") +
        e.what());
  }

  VPackBuilder result;
#if USE_ENTERPRISE
  TRI_GET_GLOBALS();
  HotBackup h(v8g->_server);
  auto r = h.execute("create", obj.slice(), result);
  if (r.fail()) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(r.errorNumber(), r.errorMessage());
  }
#else
  result.add(obj.slice());
#endif

  TRI_V8_RETURN(TRI_VPackToV8(isolate, result.slice()));
  TRI_V8_TRY_CATCH_END
}