Hello,
I wanted to Backup a Site Collection once a week with a full-backup and every other day of the week with an incremental or differential backup, but I think that isn't possible that easily, Right? I'm relatively new to SharePoint and PowerShell, so please excuse my lack of Knowledge here.
If it isn't possible with an easy command: Do you have any idea how I could manage that?
I thought about looping through all sites and getting the data when it was last modified to know what it has to backup, but that's all I got:
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$sites = Get-SPSite -Limit All | Get-SPWeb -Limit All
foreach ($site in $sites) {
??
}
}
$sites.Dispose()Im really overchallenged as you can see. It isn't many code and it isn't nice, but I really don't know how to do it and I didn't find anything useful for me.
Thank you for your help.
Best Regards,
Robin
_________________________________________________________________________________
EDIT:
Hello everybody,
thanks for your answers, but I think I have to write something, because everyone is just replying to the first section of my Question. I know About the Backup-SPfarm and Backup-Spsite commands and I know, that non of These commands can do an incremental backup of just one sitecollection.
So, if this isn't possible with an easy one-liner, my second Question was: Is it possible with a PowerShell script that loops through all sites of the sitecollection?
Best regards,
Robin