Files
scylladb/db/snapshot/backup_task.hh
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00

52 lines
1.3 KiB
C++

/*
* Copyright (C) 2024-present ScyllaDB
*
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#pragma once
#include <filesystem>
#include "utils/s3/client_fwd.hh"
#include "tasks/task_manager.hh"
namespace db {
class snapshot_ctl;
namespace snapshot {
class backup_task_impl : public tasks::task_manager::task::impl {
snapshot_ctl& _snap_ctl;
shared_ptr<s3::client> _client;
sstring _bucket;
sstring _prefix;
std::filesystem::path _snapshot_dir;
s3::upload_progress _progress = {};
future<> do_backup();
protected:
virtual future<> run() override;
public:
backup_task_impl(tasks::task_manager::module_ptr module,
snapshot_ctl& ctl,
shared_ptr<s3::client> cln,
sstring bucket,
sstring prefix,
sstring ks,
std::filesystem::path snapshot_dir) noexcept;
virtual std::string type() const override;
virtual tasks::is_internal is_internal() const noexcept override;
virtual tasks::is_abortable is_abortable() const noexcept override;
virtual future<tasks::task_manager::task::progress> get_progress() const override;
virtual tasks::is_user_task is_user_task() const noexcept override;
};
} // snapshot namespace
} // db namespace