The more I dig into it, the more it seems it is bareos after all.
Unfortunately, building Windows bareos-fd is no small feat so I cannot directly debug it but.
I ran a procmon against bareos-fd.exe and it seems that while the FD process does create a VSS snapshot... it doesn't read from it. It reads the files straight from the main device. I did a small test fileset consisting of just my user's registry file. And both procmon's dump as well as bareos-fd own debug trace shows that it's trying to read simply a c:\users\test\ntuser.dat instead of properly going for \\?\GLOBALROOT\Device\HardDiskVolumeShadowCopyXX\Users\test\ntuser.dat. That would explain why the job even though it's supposed to use VSS, fails on copying open files.
When I created a very small example VS project just creating a
VSS snapshot and copying said file out of the VSS snapshot (using
the proper shadow copy volume path), it works OK.
MK
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/56334b0f-cabd-4570-8e4d-c7ba70b8dfc7n%40googlegroups.com.
As I understand, this is the interesting excerpt from the debug trace.
win10test-fd (50): findlib/find.cc:169-0 Verify=<V>
Accurate=<Cmcs> BaseJob=<Jspug5>
flags=<724185736>
win10test-fd (50): findlib/find.cc:169-0 Verify=<V>
Accurate=<Cmcs> BaseJob=<Jspug5>
flags=<724185736>
win10test-fd (450): findlib/find.cc:175-0 F
C:/Users/test/NTUSER.DAT
win10test-fd (500): compat/compat.cc:278-0 Enter
convert_unix_to_win32_path
win10test-fd (500): compat/compat.cc:322-0 path =
\\?\C:\Users\test\NTUSER.DAT
win10test-fd (500): compat/compat.cc:328-0 Leave
cvt_u_to_win32_path path=\\?\C:\Users\test\NTUSER.DAT
win10test-fd (500): compat/compat.cc:234-0 Win32ConvInitCache:
Setup of thread specific cache at address 1532b2b76d0
win10test-fd (500): compat/compat.cc:531-0 Enter
make_wchar_win32_path
win10test-fd (500): compat/compat.cc:555-0 Leave
make_wchar_win32_path=\\?\C:\Users\test\NTUSER.DAT
win10test-fd (500): compat/compat.cc:1609-0 sizino=8 ino=0
filename=C:/Users/test/NTUSER.DAT
win10test-fd (300): findlib/find_one.cc:911-0 File ----:
C:/Users/test/NTUSER.DAT
win10test-fd (130): filed/backup.cc:535-0 FT_REG saving:
C:/Users/test/NTUSER.DAT
win10test-fd (130): filed/backup.cc:646-0 filed: sending
C:/Users/test/NTUSER.DAT to stored
win10test-fd (150): lib/crypto_openssl.cc:641-0 crypto_digest_new
jcr=1532b228410
win10test-fd (300): filed/backup.cc:1575-0 encode_and_send_attrs
fname=C:/Users/test/NTUSER.DAT
win10test-fd (500): compat/compat.cc:278-0 Enter
convert_unix_to_win32_path
win10test-fd (500): compat/compat.cc:322-0 path =
\\?\C:\Users\test\NTUSER.DAT
win10test-fd (500): compat/compat.cc:328-0 Leave
cvt_u_to_win32_path path=\\?\C:\Users\test\NTUSER.DAT
win10test-fd (300): filed/backup.cc:1594-0 File
C:/Users/test/NTUSER.DAT
attribs=A A IH/ B A A CAi FAAA A A BlnTaz BlnTaz BlnTaz A A L
attribsEx=CAi HaQkZzohoU HaQvQ8Q7yY HaQvQ8Q7yY A FAAA
win10test-fd (300): filed/backup.cc:1620-0 >stored: attrhdr 1 5
0win10test-fd (200): filed/backup.cc:1772-0 No strip for
C:/Users/test/NTUSER.DAT
win10test-fd (300): filed/backup.cc:1715-0 >stored: attr
len=130: 1 3 C:/Users/test/NTUSER.DAT
win10test-fd (150): filed/backup.cc:737-0 type=3 do_read=1
win10test-fd (100): findlib/bfile.cc:710-0 bopen: fname
C:/Users/test/NTUSER.DAT, flags 00100000, mode 0000, rdev 8226
win10test-fd (50): findlib/bfile.cc:565-0 === NO plugin
win10test-fd (100): findlib/bfile.cc:664-0 Read
CreateFileW=\\?\C:\Users\test\NTUSER.DAT
win10test-fd (850): lib/message.cc:1216-0 Enter Jmsg type=8
win10test-fd (850): lib/message.cc:613-0 Enter DispatchMessage
type=8 msg=win10test-fd JobId 16959: Cannot open
"C:/Users/test/NTUSER.DAT": ERR=The process cannot access the file
because it is being used by another process.
.
win10test-fd (850): lib/message.cc:820-0 DIRECTOR for following
msg: win10test-fd JobId 16959: Cannot open
"C:/Users/test/NTUSER.DAT": ERR=The process cannot access the file
because it is being used by another process.
.
win10test-fd (400): findlib/find_one.cc:493-0 FT_REG FI=1 linked=0
file=C:/Users/test/NTUSER.DAT
From what I understand from the description of the
make_wchar_win32_path() method in win32/compat/compat.cc - we
should leave the function with the filename properly converted to
VSS-based one. But apparently we're stuck with local name.
MK
I used the relatively new available client. (23-pre-something,
downloaded around 2 weeks ago). Yes, I should have written that
explicitly.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/8169ba0f-0d16-450b-bb91-d72e56db9ee7n%40googlegroups.com.
Hi Bruno.
Yes, I understand how it's supposed to work. :-)
OK, I will re-run the tests when I have a spare minute and dump the trace somewhere (the excerpt I posted earlier was with debug level 999 so all messages should have been captured).
And it's not that I _thought_ it wasn't backed up. I know it wasn't backed up. It was throwing errors of being unable to access the file and if I wanted to restore the files I got a zero-length content. I know it should have been converted to the shadowcopy-based filename but wasn't.
I'll check the latest package version first though.
MK
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/9bb76105-597b-4cb9-b5b5-95f54e5b96e6n%40googlegroups.com.
OK. I had a few spare minutes. I did upgrade to the pre57 release I downloaded today from https://download.bareos.org/current/windows/
The fileset is very simple so that the job is quick and short. It consists of just one file from the windows registry (so that it will be open for sure).
FileSet {
Name = "Windows_test"
Enable VSS = yes
Include {
File = "C:/windows/system32/config/DEFAULT"
Options {
onefs = no
Signature = MD5
IgnoreCase = yes
Portable = no
}
}
}
(I tried with both Portable=no as well as Portable=yes as I found some info that it may change backup job behaviour but there was no difference. onefs option is just a remnant from older test jobs, I assume it should have no impact here as we're only targeting a single file).
Attaching the trace from the FD. It's the same as before - the
snapshot is being created but the filename is not being converted
for read in the end even though the snapshot is there.
MK
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/F46rRPh7Hf8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/30b4adee-5fe4-44dc-8f63-e63eb803fd5dn%40googlegroups.com.
Hi Spadajspadaj,
something is wrong with your debug output but im not sure why. Debug messages are normally formatted as
daemon-name (level): file:line-jobid
FileSet {
Name = "Windows_test"
Enable VSS = yes
Include {
File = "C:/windows/system32/config/DEFAULT"
Options {
onefs = no
Signature = MD5
IgnoreCase = yes
Portable = no
}
}
}
-- Sebastian Sura sebasti...@bareos.com Bareos GmbH & Co. KG Phone: +49 221 630693-0 https://www.bareos.com Fax: +49 221 630693-10 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646 Komplementär: Bareos Verwaltungs-GmbH Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz
Hi Sebastian.
Thx for looking into it. This is the job log. Not much interesting stuff in there.
The same thing (the jobid being zero in the trace log) was in the
previous trace I attached excerpt from few days ago. But that one
was from a different machine. That was a clean win10 installation
just for testing the FD, this one is my production setup. Anyway,
one thing that can be relatively uncommon (but I don't see why it
should affect anything about the job itself) is that I use passive
clients (Connection From Client to Director=yes, Heartbeat
Interval=60).
MK
*list joblog jobid=17062
Automatically selected Catalog: PgCatalog
Using Catalog "PgCatalog"
2024-01-18 08:06:04 backup1-dir JobId 17062: Start Backup JobId
17062, Job=win10test-fd.2024-01-18_08.06.02_12
2024-01-18 08:06:04 backup1-dir JobId 17062: Connected Storage
daemon at backup1.local:9103, encryption:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
2024-01-18 08:06:04 backup1-dir JobId 17062: Encryption:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
2024-01-18 08:06:04 backup1-dir JobId 17062: Using Client
Initiated Connection (dziura-fd).
2024-01-18 08:06:04 backup1-dir JobId 17062: Handshake:
Immediate TLS
2024-01-18 08:06:04 backup1-dir JobId 17062: Encryption:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
2024-01-18 08:06:04 backup1-dir JobId 17062: Using Device
"vchanger-1-0" to write.
2024-01-18 08:06:03 dziura-fd JobId 17062: Created 27 wildcard
excludes from FilesNotToBackup Registry key
2024-01-18 08:06:03 dziura-fd JobId 17062: Connected Storage
daemon at backup1.local:9103, encryption:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
2024-01-18 08:06:03 dziura-fd JobId 17062: Encryption:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
2024-01-18 08:06:05 bareos-sd JobId 17062: Volume
"vchanger-1_0002_0042" previously written, moving to end of data.
2024-01-18 08:06:05 bareos-sd JobId 17062: Ready to append to end
of Volume "vchanger-1_0002_0042" size=26886488931
2024-01-18 08:06:05 dziura-fd JobId 17062: Generate VSS
snapshots. Driver="Win64 VSS"
2024-01-18 08:06:07 dziura-fd JobId 17062:
(C:\)\\?\Volume{7730df77-9bec-432c-a00a-597b4bf1a6f6}\ ->
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy16
2024-01-18 08:06:07 dziura-fd JobId 17062: Cannot open
"C:/windows/system32/config/DEFAULT": ERR=The process cannot
access the file because it is being used by another process.
.
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "Task Scheduler Writer", State: 0x1
(VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "VSS Metadata Store Writer", State: 0x1
(VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "Performance Counters Writer", State: 0x1
(VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "System Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "ASR Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "Registry Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "Shadow Copy Optimization Writer", State: 0x1
(VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "WMI Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "BITS Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:08 dziura-fd JobId 17062: VSS Writer
(BackupComplete): "COM+ REGDB Writer", State: 0x1 (VSS_WS_STABLE)
2024-01-18 08:06:09 bareos-sd JobId 17062: Releasing device
"vchanger-1-0" (/var/spool/vchanger/vchanger-1/0).
2024-01-18 08:06:09 bareos-sd JobId 17062: Elapsed time=00:00:04,
Transfer rate=158 Bytes/second
2024-01-18 08:06:09 backup1-dir JobId 17062: Insert of attributes
batch table with 1 entries start
2024-01-18 08:06:09 backup1-dir JobId 17062: Insert of attributes
batch table done
2024-01-18 08:06:09 backup1-dir JobId 17062: Bareos backup1-dir
24.0.0~pre154.115b3ebca (08Jan24):
Build OS: Red Hat Enterprise Linux release 8.7
(Ootpa)
JobId: 17062
Job: win10test-fd.2024-01-18_08.06.02_12
Backup Level: Full
Client: "dziura-fd" 23.0.1~pre57.8e89bfe0a
(16Jan24) Microsoft Windows 8 Professional (build 9200),
64-bit,Cross-compile
FileSet: "Windows_test" 2024-01-18 08:06:02
Pool: "Offsite-eSATA" (From Job resource)
Catalog: "PgCatalog" (From Client resource)
Storage: "vchanger-1-changer" (From Pool
resource)
Scheduled time: 18-Jan-2024 08:06:01
Start time: 18-Jan-2024 08:06:04
End time: 18-Jan-2024 08:06:09
Elapsed time: 5 secs
Priority: 10
Allow Mixed Priority: no
FD Files Written: 2
SD Files Written: 2
FD Bytes Written: 0 (0 B)
SD Bytes Written: 634 (634 B)
Rate: 0.0 KB/s
Software Compression: None
VSS: yes
Encryption: no
Accurate: no
Volume name(s): vchanger-1_0002_0042
Volume Session Id: 116
Volume Session Time: 1704808920
Last Volume Bytes: 26,886,490,011 (26.88 GB)
Non-fatal FD errors: 1
SD Errors: 0
FD termination status: OK
SD termination status: OK
Bareos binary info: Bareos pre-release (UNSUPPORTED): Get
professional support from https://www.bareos.com
Job triggered by: User
Termination: Backup OK -- with warnings
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/1154382e-9d9f-4252-bd16-92284ba6e010%40bareos.com.
Yes. It does seem to be the cause.
I switched the client connectivity to the "normal" mode (director to client) and the job completed OK and I had no problems accessing the registry file.
MK
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/f7f107b9-ba57-4ef4-84d8-a275a562bf67n%40googlegroups.com.
We managed to reproduce the issue. As you already noted, the cause was the "connection from client to director" option.
This was fixed by https://github.com/bareos/bareos/pull/1665
The current next release ( https://download.bareos.org/next/ ) already contains the fix. Let me know if you tried that version and the issue still persists!
Sincerly
Sebastian Sura
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/4c058438-864a-4ebe-8a17-54c1401e368cn%40googlegroups.com.
Yes, it does seem to be working!
22-Jan 14:16 dziura-fd JobId 17111: Generate VSS snapshots. Driver="Win64 VSS" 22-Jan 14:16 dziura-fd JobId 17111: VolumeMountpoints are not processed as onefs = yes. 22-Jan 14:16 dziura-fd JobId 17111: VolumeMountpoints are not processed as onefs = yes. 22-Jan 14:16 dziura-fd JobId 17111: (S:\)\\?\Volume{260653cf-633a-4504-992e-f82620702a9e}\ -> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy31 22-Jan 14:16 dziura-fd JobId 17111: (C:\)\\?\Volume{7730df77-9bec-432c-a00a-597b4bf1a6f6}\ -> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy30 [...] Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK *status client=dziura-fd [...] dziura-fd Version: 24.0.0~pre187.8e12c147a (22 January 2024) VSS Microsoft Windows 8 Professional (build 9200), 64-bit
Thank you!
MK
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/97579337-c80a-4b0d-8a71-997c2633489f%40bareos.com.
They can be found here: https://download.bareos.org/current/
Sincerly
Sebastian Sura
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/288384c2-7743-4afe-8ce0-791e50b6c898n%40googlegroups.com.
-- Sebastian Sura sebasti...@bareos.com Bareos GmbH & Co. KG Phone: +49 221 630693-0 https://www.bareos.com Fax: +49 221 630693-10