Files
one/include/ProtocolMessages.h
Ruben S. MonteroandMichal Opala e83ce716bb F #6029, #6074: Retention and restore opetions for incremental backups
* Introduce support to follow KEEP_LAST for incremental backups.
  - New increment_flatten action added for backup datastores.
  - increment_flatten will consolidate KEEP_LAST increments into the
    current first increment in the chain.
  - increment_flatten MUST return the new chain (inc1:source1,...) and size
    of the new first increment (FULL) in the chain.

* Downloader logic for restore has been extracted from downloader.sh to
  reuse the increment flatten logic. A new command restic_downloader.rb
  process restic:// pseudo-urls.

* Restore process uses two new attributes to customize the restore
  process:
  - NAME to be used as base name for images and VM Template
  - INCREMENT_ID to restore disks from a given increment (not always the
    last one)

* Common logic has been added to BackupImage class (backup.rb)

* Includes the following fixes:
  - Fix when increment includes blocks larger than max qemu-io request size
  - Fix IMAGE counter for quotas on backup images
  - Fix rsync restore NO_IP / NO_NIC attributes

TODO:
* Mimic increment_flatten logic and restore images on the backup server
* Suntone restore options

co-authored-by:Michal Opala <mopala@opennebula.io>
2023-02-07 13:17:34 +01:00

204 lines
4.2 KiB
C

/* -------------------------------------------------------------------------- */
/* Copyright 2002-2023, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
/* not use this file except in compliance with the License. You may obtain */
/* a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
#ifndef PROTOCOL_MESSAGES_H
#define PROTOCOL_MESSAGES_H
#include "Message.h"
/**
* Messages between the Monitor daemon and OpenNebula daemon
*/
enum class InformationManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
HOST_LIST,
UPDATE_HOST,
DEL_HOST,
START_MONITOR,
STOP_MONITOR,
HOST_STATE,
VM_STATE,
HOST_SYSTEM,
RAFT_STATUS,
ENUM_MAX
};
using im_msg_t = Message<InformationManagerMessages, true, true, false, false>;
/**
* Image Manager Driver messages
*/
enum class ImageManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
CP,
CLONE,
STAT,
MKFS,
RM,
MONITOR,
SNAP_DELETE,
SNAP_REVERT,
SNAP_FLATTEN,
RESTORE,
INCREMENT_FLATTEN,
LOG,
ENUM_MAX
};
using image_msg_t = Message<ImageManagerMessages, false, false, false, false>;
/**
* Auth Manager Driver messages
*/
enum class AuthManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
AUTHORIZE,
AUTHENTICATE,
LOG,
ENUM_MAX
};
using auth_msg_t = Message<AuthManagerMessages, false, false, false, false>;
/**
* IPAM Manager Driver messages
*/
enum class IPAMManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
REGISTER_ADDRESS_RANGE,
UNREGISTER_ADDRESS_RANGE,
GET_ADDRESS,
ALLOCATE_ADDRESS,
FREE_ADDRESS,
VNET_CREATE,
VNET_DELETE,
LOG,
ENUM_MAX
};
using ipam_msg_t = Message<IPAMManagerMessages, false, false, false, false>;
/**
* MarketPlace Manager Driver messages
*/
enum class MarketPlaceManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
IMPORT,
DELETE,
MONITOR,
LOG,
ENUM_MAX
};
using market_msg_t = Message<MarketPlaceManagerMessages, false, false, false, false>;
/**
* Transfer Manager Driver messages
*/
enum class TransferManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
TRANSFER,
DRIVER_CANCEL,
LOG,
ENUM_MAX
};
using transfer_msg_t = Message<TransferManagerMessages, false, false, false, false>;
/**
* Virtual Machine Driver messages
*/
enum class VMManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
DEPLOY,
SHUTDOWN,
RESET,
REBOOT,
CANCEL,
CLEANUP,
CHECKPOINT,
SAVE,
RESTORE,
MIGRATE,
ATTACHDISK,
DETACHDISK,
ATTACHNIC,
DETACHNIC,
SNAPSHOTCREATE,
SNAPSHOTREVERT,
SNAPSHOTDELETE,
DISKSNAPSHOTCREATE,
DISKSNAPSHOTREVERT,
RESIZEDISK,
UPDATECONF,
UPDATESG,
DRIVER_CANCEL,
LOG,
RESIZE,
BACKUP,
UPDATENIC,
ENUM_MAX
};
using vm_msg_t = Message<VMManagerMessages, false, false, false, false>;
/**
* Virtual Machine Driver messages
*/
enum class HookManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
EXECUTE,
RETRY,
LOG,
ENUM_MAX
};
using hook_msg_t = Message<HookManagerMessages, false, false, false, false>;
#endif /*PROTOCOL_MESSAGES_H*/