Refactoring backups.

This commit is contained in:
Your Name
2025-04-26 21:06:42 +12:00
parent b07e3830de
commit e033489f9b
11 changed files with 298 additions and 97 deletions

View File

@ -3,9 +3,9 @@
#include "server_env.hpp"
#include <iostream>
#include <string>
#include <boost/filesystem.hpp>
#include <filesystem>
namespace fs = boost::filesystem;
namespace fs = std::filesystem;
namespace dropshell {
@ -187,14 +187,14 @@ std::string get_local_service_env_path(const std::string &server_name, const std
return (fs::path(service_path) / "template").string();
}
std::string get_remote_service_backups_path(const std::string &server_name, const std::string &service_name)
std::string get_remote_backups_path(const std::string &server_name)
{
if (server_name.empty() || service_name.empty())
if (server_name.empty())
return std::string();
std::string service_path = get_remote_service_path(server_name, service_name);
if (service_path.empty())
std::string dropshell_path = get_remote_DROPSHELL_path(server_name);
if (dropshell_path.empty())
return std::string();
return (fs::path(service_path) / "backups").string();
return (fs::path(dropshell_path) / "backups").string();
}
std::string get_remote_service_env_file(const std::string &server_name, const std::string &service_name)