• SharePoint 数据库管理-PowerShell


    1. 显示所有SharePoint数据库

    Get-SPDatabase –ServerInstance "SP2010SQLSharePoint"

    2. 获取指定的数据库

    $database = Get-SPDatabase
    -Identity 47036154-7a05-44be-9137-9be09f43ccb5

    3. 创建一个新的内容数据库

    New-SPContentDatabase –Name NewContentDB –WebApplication "PSWebApp"

    4. 显示一个Web应用程序下所有的数据库

    Get-SPContentDatabase –WebApplication "PSWebApp"

    5. 从一个Web应用程序移除一个数据库

    $database = Get-SPContentDatabase
    -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8
    Dismount-SPContentDatabase $database

    6. 附加一个数据库到Web应用程序

    Mount-SPContentDatabase –Name "NewContentDB"
    –WebApplication "PSWebApp"

    7. 删除一个内容数据库

    $database = Get-SPContentDatabase
    -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8
    Remove-SPContentDatabase $database

    8. 创建配置数据库

    New-SPConfigurationDatabase –DatabaseName NewConfigurationDB
    –DatabaseServer "SP2010SQLSharePoint"

    9. 删除配置数据库

    Remove-SPConfigurationDatabase

    10. 备份配置数据库

    Backup-SPConfigurationDatabase –Directory F:Backups

    Backup-SPFarm –BackupMethod Full –Directory F:Backups
    -ConfigurationOnly

    Full为完全备份,也可以使用Differential增量备份

    11. 恢复配置数据库

    Restore-SPFarm –Directory F:Backups –ConfigurationOnly
    –RestoreMethod Overwrite

    12. 备份SharePoint场

    Backup-SPFarm –BackupMethod Full –Directory F:Backups

    使用-ShowTree参数显示场中所有可备份的项目;使用-Item参数备份指定的项目

    13. 恢复SharePoint场

    Restore-SPFarm –Directory F:Backups –RestoreMethod Overwrite

    使用-Item参数恢复指定的项目

    14. 备份网站集

    Backup-SPSite –Identity "http://sp2010/sites/BICenter"
    –Path F:BackupsBICenter.bak

    15. 还原网站集

    Restore-SPSite –Identity "http://sp2010/sites/BICenter"
    –Path F:BackupsBICenter.bak –Force
  • 相关阅读:
    bootstrap table 怎么自适应宽度
    nginx解决超长请求串(413 request Entity too Large错误解决办法)
    nginx proxy_buffer_size 解决后端服务传输数据过多,其实是header过大的问题
    测试了下boost的序列化反序列化功能
    测试C++代码与WebBrowser HTML的互动
    Open SSL 开发环境配置
    modern-cpp-features
    Qt程序调试之Q_ASSERT断言(条件为真则跳过,否则直接异常+崩溃)
    分布式事务
    Django admin
  • 原文地址:https://www.cnblogs.com/justinliu/p/5961724.html
Copyright © 2020-2023  润新知