开发者

BackupWrite() and BackupRead() in Win32

开发者 https://www.devze.com 2023-01-13 19:06 出处:网络
My understanding is that these functions can be used to serialize a file for backing up and restoring.

My understanding is that these functions can be used to serialize a file for backing up and restoring.

I'm unclear what they serialize. For example, do they serialize 开发者_运维知识库the file attributes (hidden, readonly, etc)? What about the 8.3 name?

I do believe they serialize all the file's streams and security options. But what happens when restoring on a second computer that doesn't have the same set of users?


Nah, the short name gets created on-the-fly when the file is restored. Which is very important, the original short name might already be in use.

What happens to the access rights is documented in the SDK docs for BackupWrite. Note the bProcessSecurity argument. Not sure what happens when the SID doesn't exist, easy to find out by trying that.


after some experiments I believe (but dont have any supporting docs) the following

-the restore app is responsible for attributes, names, and dates (read: everything but the file streams and security)

-Backup{Read,Write} are responsible for all file streams and security values

0

精彩评论

暂无评论...
验证码 换一张
取 消