int64_t run_housekeeping(BackupStoreAccountDatabase::Entry& rAccount) { std::string rootDir = BackupStoreAccounts::GetAccountRoot(rAccount); int discSet = rAccount.GetDiscSet(); // Do housekeeping on this account HousekeepStoreAccount housekeeping(rAccount.GetID(), rootDir, discSet, NULL); housekeeping.DoHousekeeping(HousekeepStoreAccount::DefaultAction, true /* keep trying forever */); return housekeeping.GetErrorCount(); }
std::string BackupStoreRefCountDatabase::GetFilename(const BackupStoreAccountDatabase::Entry& rAccount, bool Temporary) { std::string RootDir = BackupStoreAccounts::GetAccountRoot(rAccount); ASSERT(RootDir[RootDir.size() - 1] == '/' || RootDir[RootDir.size() - 1] == DIRECTORY_SEPARATOR_ASCHAR); std::string fn(RootDir + REFCOUNT_FILENAME ".rdb"); if(Temporary) { fn += "X"; } RaidFileController &rcontroller(RaidFileController::GetController()); RaidFileDiscSet rdiscSet(rcontroller.GetDiscSet(rAccount.GetDiscSet())); return RaidFileUtil::MakeWriteFileName(rdiscSet, fn); }