In class IDiskRemote, all metadata file system operations use os file system api directly.
There is little extendiability if we want store the metadata of HDFS or S3 into distributed file system.
So I suggest change this way by using DiskPtr and will propose a pull request.

In addition, metadata of HDFS or S3 only store local FS which is not sharable.

throw Exception(fmt::format("Invalid property {} in restore file", property), ErrorCodes::UNKNOWN_FORMAT);
            auto key = property.substr(0, pos);
            auto value = property.substr(pos + 1);
            auto it = properties.find(key);
            if (it != properties.end())
                throw Exception(fmt::format("Property key duplication {} in restore file", key), ErrorCodes::UNKNOWN_FORMAT);
            properties[key] = value;
        }
        for (const auto & [key, value] : properties)
        {
            ReadBufferFromString value_buffer (value);
            if (key == "revision")
                readIntText(restore_information.revision, value_buffer);
            else if (key == "source_bucket")
                readText(restore_information.source_bucket, value_buffer);
            else if (key == "source_path")
                readText(restore_information.source_path, value_buffer);
            else if (key == "detached")
                readBoolTextWord(restore_information.detached, value_buffer);
            else
                throw Exception(fmt::format("Unknown key {} in restore file", key), ErrorCodes::UNKNOWN_FORMAT);
        }
    }
    catch (const Exception &)
    {
        tryLogCurrentException(log, "Failed to read restore information");
        throw;
    }
}
void DiskS3::restore()