SharePoint通过stsadm备份和还原子网站(不是网站集)
大家都知道SharePoint的stsadm命令提供了很多便捷甚至是唯一的操作方法!
这里列出的所有命令:http://www.cnblogs.com/dadongzuo/archive/2013/05/21/3091043.html
在这里,我要单独说export/import这2个命令,主要是用于导出导入子站点时使用的。(由于曾经被这个问题折腾过,又忘了,所以这次准备记录下来,也让大家少走弯路)
例如:
https://dms.demo.com.cn/sites/MT2/Guangzhou%20%20HZCLTS/
要迁移到
https://dms.demo.com.cn/sites/MT2/test0608/
注意,这个来源子站点名称是"Guangzhou%20%20HZCLTS” 中间有2个空格URL里自动加上了替换符%20
Export脚本如下:
@SET STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.exe"
%STSADM% -o export -url "https://dms.demo.com.cn/sites/MT2/Guangzhou HZCLTS/" -filename Guangzhou%20%20HZCLTS.dat -includeusersecurity -versions 4
pause
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
执行成功!注意上面红色部分中间的空格不要使用%20,否则会报错!(类似的特殊符号啥的也要自己把它改回为子网站名)并且Sharepoint不会告诉你是这个错,会告诉你只能在网站集或者网站使用此命令!你就会疑惑明明我这就是子网站呀。呵呵。。我敢说用这个命令不成功的人基本都是这个问题
Import脚本如下:
@SET STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.exe"
%STSADM% -o import –url "https://dms.demo.com.cn/sites/MT2/test0608/" -filename Guangzhou%20%20HZCLTS.dat -includeusersecurity -updateversions 2
pause
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
PS:
命令格式:
stsadm
-o export
-url <URL to be exported>
-filename <export file name>
[-overwrite]
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-versions <1-4> 1= Last major version for files and list items (default), 2= The current version, either the last major or the last minor, 3= Last major and last minor version for files and list items, 4= All versions for files and list items]
[-cabsize <integer from 1-1024 megabytes> (default: 25)]
[-nofilecompression]
[-quiet]
stsadm
-o import
-url <URL to import to>
-filename <import file name>
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-updateversions <1-3> 1= Add new versions to the current file (default), 2= Overwrite the file and all its versions (delete then insert),3= Ignore the file if it exists on the destination]
[-nofilecompression]
[-quiet]
SharePoint通过stsadm备份和还原子网站(不是网站集)的更多相关文章
- 移动端网站如何开发(电脑端网站到手机端网站我们需要在html代码中添加哪个meta标签)
移动端网站如何开发(电脑端网站到手机端网站我们需要在html代码中添加哪个meta标签) 一.总结 一句话总结: 添加viewport标签:meta name="viewport" ...
- 阿里云服务器:IIS网站的架设(一、环境设置与安装IIS网站 二、网站的基本设置 三、建立新网站(未完待续))
Windows Server 2012 R2的Internet Information Services (IIS)网站的模块化设计,可以减少被攻击面并减轻管理负担,让系统管理员更容易架设安全的具备高 ...
- 【扫盲】HTML5、Web APP、3G网站、Wap网站傻傻分不清楚
移动互联网指手机网站和app,其中app分为native app(原生app),web app(html5开发),Hybrid app(前两种app结合):手机网站分为wap网站和3g网 ...
- JavaScript选择打开手机网站还是电脑网站
现在手机网站越来越普遍,类似京东.淘宝.新浪等等大家都推出了wap版,一种简单的方法判断,JavaScript选择打开手机网站还是电脑网站,如果是手机网站就让网页跳转到手机网址.如果是电脑网站,打开电 ...
- dedecms网站扩展手机网站—共用数据库真正做到电脑手机同步访问,原pc站无需改动,对原pc站无任何影响
在如今无线互联网大潮的冲击下,越来越多的pc网站访问量下降,首当其冲的就是以pc网站为生的站长们,为了顺应无线互联网的要求,站长们很有必要为自己的pc网站扩展一套手机网站,更早的抓住手机用户的流量,使 ...
- VS中生成网站和发布网站的区别
VS中生成网站和发布网站的区别 生成网站:是网站项目的编译. 我们知道像一样的C#编译性语言,在运行程序的时候,首先都要经过编译成计算机识别的二进制代码,才能运行.还有网站编译后,浏览 ...
- 百度网站统计和CNZZ网站统计对比
一,前言 百度统计和cnzz统计是目前市面上比较流行的两种web统计工具,接下来将对两个统计工具做初步的体验测评 百度网站统计相关介绍:全球最大的中文网站流量分析平台,帮助企业收集网站访问数据,提供流 ...
- SharePoint 2013 List 备份使用
在测试环境新建List后经过不懈的调整,验证终于做出一个像模像样的表单. 这时候问题来... 要怎么迁移到生产环境或者正式环境呢? 在网上找了一些资料,不过都是10的.. 其实想想13跟10区别不大, ...
- [SharePoint 2013 入门教程 2 ] 创建WEB应用程序,网站集,网站
SharePoint 2013 的 Hello World 由大到小 创建WEB应用程序(老母),网站集(儿子),网站(孙子) 直接确定,其余都默认 填入标题,选好模板.网站集 儿子就有了. 点击页 ...
随机推荐
- zk框架中利用map类型传值来创建window,并且传值
@Command @NotifyChange("accList") public void clear(@BindingParam("id") String a ...
- 论文第5章:Android绘图平台的实现
面向移动设备的矢量绘图平台设计与实现 Design and Implementation of Mobile Device-oriented Vector Drawing Platform 引用本论文 ...
- MySQL批量SQL插入性能优化
对于一些数据量较大的系统,数据库面临的问题除了查询效率低下,还有就是数据入库时间长.特别像报表系统,每天花费在数据导入上的时间可能会长达几个小时或十几个小时之久.因此,优化数据库插入性能是很有意义的. ...
- 基于jquery的响应式提示框SweetAlert
介绍款交互性非常不错的jquery弹出层插件,支持消息提示.错误提示.确认框提示等.交互式体验感非常不错,比如咱们现在体验非常不错的微信支付.支付宝等完成后的效果.不过本插件至少支持IE9+.使用方式 ...
- 表格CSS样式美化
1. 单像素边框CSS表格 这是一个很常用的表格样式. <!-- CSS goes in the document HEAD or added to your external styleshe ...
- 《javascript模式》 容易踩中的那些坑
1 链式赋值的陷阱 1: function func(){ 2: var innerVar = globalVar = 20; 3: } 4: func(); 5: console.log(typeo ...
- 关于VR技术和未来发展---转
原文地址:http://mp.weixin.qq.com/s?__biz=MzA4MTIwNTczMQ==&mid=2651345594&idx=3&sn=2741ab7321 ...
- python内置模块(1)
Python的模块在其它语言中通常称为库或类库,也就是lib.它是编程语言的第三级封装,第四级则是包,也就是模块的打包组合,而前两级分别是函数和类.封装的好处,自然不用多言,高内聚,松耦合,减少代码重 ...
- [Solution] ASP.NET Identity(2) 空的项目使用
在本节中,我将说明将ASP.NET Identity添加到现有的项目或者一个空项目.我将介绍你需要添加的Nuget和Class.此示例中,会使用LocalDB. 本节目录: 注册用户 登入登出 注册用 ...
- 复利程序(c语言)(张俊毅 周修文)
因为之前发烧一直没有了解这个 所以最近才补上 分数扣了就扣了 补上先 单元测试迟点更 #include<stdio.h> #include <math.h> #include ...