As we all know there was a bug in the SCCM 2012 RTM Backup Site procedure. There was a workaround by creating a sub-folder underneath the Backup folder when using UNC paths.
This is described by Microsoft in: http://blogs.technet.com/b/configurationmgr/archive/2012/08/01/support-tip-a-backup-site-server-maintenance-task-may-fail-to-run-in-configmgr-2012.aspx
Microsoft stated this would be addressed in SP1 of SCCM 2012, well let's take a look and check-out the use of the 'AfterBackup.bat' procedure!
Activating site backup
ConfigMgr console > Administration tab > Site settings > Site maintainance > Backup site server
The computer account of the ConfigMgr server has to have been granted full control permissions on the remote backup location.
Creating the AfterBackup.bat file Here is a simple script for 'AfterBackup.bat' written by 'Garth Jones', which saves 7 days backup to a folder named after the first 3 letters of the day of the week, and also deletes/overwrites the older ones. *********************************************************************************** REM @echo off setlocal enabledelayedexpansion set target=\\Destination_Server\E$\AfterBackup\%date:~0,3% If not exist %target% goto datacopy RD %target% /s /q :datacopy xcopy "\\Source_Server\*" "%target%\" /E /-Y *********************************************************************************** where, "Source_Server" is the Primary Server from which the backup has to be copied, and "Destination_Server" is the Remote Server where you want to copy the Site Backup.Source_Server (This is the UNC path specified in ConfigMgr)
\\SCCM2012\sccm$\_Backup
Destination_Server (This is where we store the backup)
\\FILE01\SCCM$\SCCM_Backup
Although the intended use of AfterBackup.bat is to archive SCCM backup snapshots, you can use that file for other tasks that you need to perform at the end of every back up operation, such as:- Run a SQL Server DBCC test to verify that there are no integrity problems with the SCCM Site database.
- Run a site health tool, or other health tools.
ConfigMgr overwrites each backup when it runs the site backup task. You must use the AfterBackup.bat or manual copy to archive more than one backup.
Starting a backup outside of the schedule You can start a backup at any time by going into the service manager which can be launched through the console. Monitoring tab > System Status > Component State > Ribbon > Start > Configuration Manager Service Manager Once in service manager, locate the SMS_SITE_BACKUP service and right click start. A backup will now start.
Another option is to go to Windows Services.msc and start the SMS_SITE_BACKUP service.
After a successful backup you will see this in your logs:
And the backup is copied over to your alternate backup location!
No comments:
Post a Comment