2022-04-20 07:38:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <base/types.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
enum class BackupStatus
|
|
|
|
{
|
|
|
|
/// Statuses of making backups
|
2022-07-26 19:46:22 +00:00
|
|
|
CREATING_BACKUP,
|
|
|
|
BACKUP_CREATED,
|
|
|
|
BACKUP_FAILED,
|
2022-04-20 07:38:12 +00:00
|
|
|
|
|
|
|
/// Status of restoring
|
|
|
|
RESTORING,
|
|
|
|
RESTORED,
|
2022-07-26 19:46:22 +00:00
|
|
|
RESTORE_FAILED,
|
2022-04-20 07:38:12 +00:00
|
|
|
|
2024-01-16 14:01:53 +00:00
|
|
|
/// Statuses used after a BACKUP or RESTORE operation was cancelled.
|
|
|
|
BACKUP_CANCELLED,
|
|
|
|
RESTORE_CANCELLED,
|
|
|
|
|
2022-04-20 07:38:12 +00:00
|
|
|
MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
std::string_view toString(BackupStatus backup_status);
|
2022-04-26 16:01:07 +00:00
|
|
|
|
|
|
|
/// Returns vector containing all values of BackupStatus and their string representation,
|
|
|
|
/// which is used to create DataTypeEnum8 to store those statuses.
|
2022-04-20 07:38:12 +00:00
|
|
|
const std::vector<std::pair<String, Int8>> & getBackupStatusEnumValues();
|
|
|
|
|
|
|
|
}
|