Backup SVN with PowerShell

I work with a team of developers and utilise SVN for our source control. The backup script in place was a simple batch file and had a few shortfalls, so I re-wrote it with PowerShell.

Essentially it checks the location of the repositories, performs a svnadmin dump to another location on the same server, then copies them over to a network share that will get put onto tape.

$RepoLocation = "C:\Repositories"
$RepoBackupLocation = "C:\ReposBackup"
$FileServerDestination = "\\file\Backups\SVN"
 
foreach ($repo in (Get-ChildItem($Repolocation)))
{
    if (!$repo.Directory)
    {
        #$repo.Name
        $svnDumpSource = $RepoLocation + "\" + $repo.Name
        $svnDumpDest = $RepoBackupLocation + "\" + $repo.Name + ".dmp"
        svnadmin dump -q $svnDumpSource > $svnDumpDest
     }
 
}
 
robocopy ($RepoBackupLocation+"\") $FileServerDestination *.dmp /Z /NP

Check SP Content Databases are configured with Failover Server

Quick one-liner to check all the content databases for SharePoint 2010 are configured properly with the Failover Server property:

Get-SPContentDatabase | Select-Object -Property DisplayName, Server, FailoverServer

Change to GetSPDatabase to get the Failover Property for all SharePoint databases. Click here (technet.microsoft.com) for a great TechNet article explaining which SharePoint 2010 databases support database mirroring.