carsten
September 30, 2023, 12:59pm
1
How is the default list of excluded files be calculated? The windows clients config seem to get them magically.
The ProgramData directory often contains importand data and should not be excluded by default.
uroni
September 30, 2023, 1:41pm
2
The default list is created like this:
}
void SetupWizard::wizardNext( wxWizardEvent& event )
{
}
void SetupWizard::finishSetup( EFileBackupChoice fileBackupChoice, EImageBackupChoice imageBackupChoice, const std::wstring& volume_choice )
{
#ifdef _WIN32
std::vector<std::wstring> pathsNotToBackup = fixupPaths(resolvePaths(getPathsNotToBackup()));
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Temp");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Microsoft\\Windows\\Temporary Internet Files");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Google\\Chrome\\User Data\\:\\Cache");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Google\\Chrome\\User Data\\:\\Media Cache");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Google\\Chrome\\User Data\\:\\Code Cache");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Microsoft\\Windows\\Explorer\\thumbcache*");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\:\\cache2");
pathsNotToBackup.push_back(L"C:\\Users\\:\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\:\\cache");
pathsNotToBackup.push_back(L"C:\\Windows\\Temp");
carsten
September 30, 2023, 1:45pm
3
I have lots of other paths in my windows clients, I never set, e.g.
C:\ProgramData\Microsoft\Windows\WER*;C:\Windows\Minidump*;:\hiberfil.sys;
Where do they come from?
Also why is hiberfile not included in the defaults any more?
uroni
September 30, 2023, 2:00pm
4
It is probably coming from the line a pointed at where it calls
if(buf!=NULL)
{
NetApiBufferFree(buf);
}
}
while (status == ERROR_MORE_DATA);
return ret;
}
std::vector<std::wstring> getPathsNotToBackup()
{
HKEY FilesNotToBackup;
if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup",
0, KEY_ENUMERATE_SUB_KEYS|KEY_READ, &FilesNotToBackup)!=ERROR_SUCCESS)
{
std::cerr << "Error opening registry key SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup" << std::endl;
return std::vector<std::wstring>();
}
DWORD maxClassLen;
which reads from registry key SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup
carsten
September 30, 2023, 5:23pm
5
It seems, that this registry entries are copies to the client configuraton at time of first setup.
This seems not the correct way to me, because the registry key entries can change over time. I think this information should not be transfered to the client configuration but the urbackupclient should reread this list at every backup.
1 Like