/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2006 Michael Vrable
+ * Copyright (C) 2008 Michael Vrable
*
* Backup data (segments and backup descriptors) may be stored on a remote
* fileserver instead of locally. The only local storage needed is for the
RemoteStore(const std::string &stagedir);
~RemoteStore();
- RemoteFile *alloc_file(const std::string &name);
+ void set_script(const std::string &script)
+ { backup_script = script; }
+ RemoteFile *alloc_file(const std::string &name, const std::string &type);
void enqueue(RemoteFile *file);
void sync();
pthread_mutex_t lock;
pthread_cond_t cond;
- std::string staging_dir;
+ std::string staging_dir, backup_script;
bool terminate; // Set when thread should shut down
bool busy; // True while there are pending transfers
std::list<RemoteFile *> transfer_queue;
friend class RemoteStore;
RemoteFile(RemoteStore *remote,
- const std::string &name, const std::string &local_path);
+ const std::string &name, const std::string &type,
+ const std::string &local_path);
RemoteStore *remote_store;
int fd;
- std::string local_path;
+ std::string type, local_path;
std::string remote_path;
};