none
how to perform the backup of multiple site collections using powershell from given .csv file as input. RRS feed

  • Question

  • Hi all,

    I have a small query that how to perform the backup of multiple site collections using power shell from given .csv file as input in power shell. 

    Thanks if quick answers.

    Sunday, April 30, 2017 5:10 PM

Answers

  • Hi

    first step is to read the csv file

    Assuming that you csv file looks like

    URL,path

    http://site1,path1

    http://site2,path2

    URL= @()
    $PATH= @()
    
    Import-Csv yourfile.csv |`
        ForEach-Object {
            Backup-SPSite $_.URL -Path $_.path
        }


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Sunday, April 30, 2017 8:22 PM

All replies

  • Hi

    first step is to read the csv file

    Assuming that you csv file looks like

    URL,path

    http://site1,path1

    http://site2,path2

    URL= @()
    $PATH= @()
    
    Import-Csv yourfile.csv |`
        ForEach-Object {
            Backup-SPSite $_.URL -Path $_.path
        }


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Sunday, April 30, 2017 8:22 PM
  • Hi

    backup-spsite cmdlet permit you to backup the entire site collection

    To backup a subsite use Eexport-Spweb cmdlet


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Sunday, April 30, 2017 8:56 PM