卷影复制(VSS) [英] Volume Shadow Copy (VSS)

查看:256
本文介绍了卷影复制(VSS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以澄清问题吗?我在自制备份实用程序*中使用VSS API(C ++使用VSS2008和运行在XP SP3上的最新SDK)。

Can anyone clarify an issue? I'm using the VSS API (C++ using VSS2008 and the latest SDK running on XP SP3) in a home-brew backup utility*.

VSS快照操作适用于没有子文件夹的文件夹 - 即我的电子邮件和SQL服务器卷。但是,当我拍摄包含子文件夹的文件夹的快照时,嵌套结构在快照中展平 - 所有子目录不再存在。

THe VSS snapshot operations work fine for folder that have no subfolders - i.e. my email and SQL server volumes. However when I take a snapshot of a folder that does contain subfolders, the nested structure is 'flattened' in the snapshot - all sub-directories cease to exist.

所以这里是一个问题:我知道对XP的VSS支持有点有限,但有一种方法来指定快照是非递归的?文档不是很有帮助...

So here is the question: I am aware that support for VSS on XP is a bit limited but is there a way to specify a snapshot be non-recursive? The docs are not very helpful ...


  • 我真的厌倦了多少垃圾,成本越来越高,每隔几天失败,所以我想我我自己滚。它会在某个时候进入CodeProject。如果有人感兴趣,请告知我们,您可以在准备好时备有(来源)副本...

Thx ++

Jerry

推荐答案

您的问题令人困惑...

Your question is confusing...

VSS在文件夹级别不起作用。它工作在一个音量水平。

VSS does not work at a "folder" level. It works a "volume" level.

您可以捕获一个卷,您将有一个设备路径,您可以使用文件系统api(将自动安装设备卷与文件系统) (按扇区)。

You "snap" a volume and you will have a device path which you can "open" using the filesystem api (which will automatically mount the device volume with a filesystem) on a file by file or you can access the device directly (sector by sector).

应该很容易备份已捕获的设备卷上的所有文件忘记所有的文件流和ACL的NTFS文件),你的问题将恢复他们... VSS不会帮助你的恢复。主要的问题是恢复系统卷,在那里你将需要另一个操作系统启动像WinPE或DOS或其他东西。如果你不担心系统卷,那么恢复可以很容易。

It should be easy to backup all files on the snapped device volume (don't forget all of the file streams and ACL's for NTFS files), your problem will be restoring them... VSS will not help you on the restore. The main problem will be restoring a system volume, where you will need another OS to boot to like WinPE or DOS or something else. If your not worried about system volumes then restore can be easy.

如果你按扇区备份数据,那么你得到额外的好处,如果你写一个卷设备驱动程序(看起来像一个卷或高清),然后Windows将自动加载文件系统驱动程序。这给你一个免费的资源管理器应用程序,这是大多数基于扇区的备份应用程序。

If you backup the data in terms of sectors, then you get the added benefit that if you write a volume device driver for it (to look like a volume or HD) then windows will auto-load a filesystem driver for it. This gives you a free explorer application, this is what most sector based backup applications do. Also it gives them VM possibilities.

即使你正在做简单的文件备份,它也有助于理解文件系统(NTFS,FAT等),以便你知道你可以/应备份和恢复。你知道NTFS的解析点是什么?如果你在备份过程中打了一个,你将如何处理它?你知道如何Windows实际上启动和什么文件,你需要备份和恢复和补丁能够有机会在启动。在还原时,如何最好地将NTFS卷布置为不影响已还原卷上的NTFS性能?你要支持将系统卷恢复到新硬件,这需要你做些什么才能有机会工作?问题是无止境的。

Even if you are doing simple file backups, it helps to understand filesystems (NTFS, FAT, etc) so that you know what you can/should backup and restore. Do you know what a NTFS reparse point is? How are you going to deal with it if you hit one during your backup? Do you know how windows actually boots and what files you need to backup and restore and "patch" to be able to have a chance at booting. On a restore, how best do you lay out the NTFS volume as not to affect NTFS performance on the restored volume? Are you going to support restoring system volumes to new hardware, what does that require you to do just to have a chance of working? The questions are endless.

系统备份/恢复不容易,有很多边缘情况(见上面的一些问题),你不知道,直到你打它们。

System backup/restore is not easy, there are lots of edge cases (see some of the questions above) that you don't know about until you hit them.

祝你好运,我希望我没有给你太多,我只是说有很多工作能够提供大多数人都不知道的备份应用程序。

Good luck on you project, I hope I haven't put you off too much, I'm just saying there is a lot of work to be able to deliver a backup application that most people have have no idea about.

这篇关于卷影复制(VSS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆