惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
J
Java Code Geeks
C
Check Point Blog
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
IT之家
IT之家
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
U
Unit 42
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ

博客园 - 在天空滑翔

Material X does not have packaging material type and is therefore not a pack.mat. - 在天空滑翔 Why do people stay in a company PDF To Excel Converter - 在天空滑翔 SRM 一点笔记 HUM [ZT]如何实现打印输出到Adobe PDF格式文件 TCode: SGEN 物料主数据中Valuation Class的确定过程 几个常用的MM报表T-Code LSMW one tip - 字段定义 scc4查看系统安装了多少个client variant configuration 被搁浅 最近学习 variant configuration Storage bin Plant相关的几个概念 SAP Best Practices 简要介绍 MMAM to change the material type for an existing material. [SAP]业务区域的帐确定 SD中几种特殊的财务处理概念
备份文件,并且保留权限
在天空滑翔 · 2009-08-12 · via 博客园 - 在天空滑翔

由于最近公司文件服务器扩容,使用Raid 5来实现,需要备份一下原来的数据,但是备份的时候,如果简单的把文件复制到另外一个硬盘,所有的权限设置都没有了。
在网上搜索了一会,微软给了2个工具permcopy和scopy,但是scopy找不到了,据说在Windows NT Server 4.0 Resource Kit 里面,但是找不到。
终于在一个中文的blog上找到了一个文章,使用Xcopy也可以实现。

http://allenggg.spaces.live.com/blog/cns!49B6CFCD69ECA1C8!215.entry,多谢这位小拐。

我增加了一个参数/C
------------------------------------------------------------------

可以使用带 /O /X /E /H /K /C 开关的 Xcopy 命令复制文件并保留已明确应用于这些文件的现有权限。
将一个文件夹复制到另一个文件夹中并保留其权限
1. 单击开始,然后单击运行。
2. 在打开框中,键入 cmd,然后单击确定。
3. 键入 xcopy sourcedestination /O /X /E /H /K ,然后按 Enter,其中 source 是要复制的文件的源路径,destination 是这些文件的目标路径。


 /O           Copies file ownership and ACL information.
 /X           Copies file audit settings (implies /O).
 /E           Copies directories and subdirectories, including empty ones.
              Same as /S /E. May be used to modify /T.
 /H           Copies hidden and system files also.
 /C           Continues copying even if errors occur.
 /K           Copies attributes. Normal Xcopy will reset read-only attributes.