--- title: "Set up Backing up Candidate Self-Service" slug: "set-up-backing-up-candidate-self-service" updated: 2023-11-23T12:55:59Z published: 2023-11-23T12:56:00Z canonical: "help.lanteria.com/set-up-backing-up-candidate-self-service" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.lanteria.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up Backing up Candidate Self-Service Follow these steps to set up the Candidate Self-Service daily backup: 1. Make sure that the SharePoint server has network access to the SQL Server **Backup** folder (**Everyone: Read/Write**) to store the Candidate Self-Service backups along with the database backups. 2. Save the following script to the **Backup** folder of AD-SQL Server. The folder path must be defined in the script.  | $backupFolder = "\\contoso-sql\BACKUP\" $temppath = "C:\Temp\Temp\" $currentTime = Get-Date -format "HH:mm:ss" Write-Host "Start: $currentTime" -foregroundcolor "Green" asnp *sh* $sites=Get-Website if (!(Test-Path $backupFolder)){mkdir $backupFolder > $null} foreach ($site in $sites){ if (Test-Path ($site.physicalPath.ToString()+"\Lanteria.ApplicantSelfService.WebApi.exe")){ $sourceFolder = $site.physicalPath.ToString() $destinationArchive = $backupFolder+$site.Name.ToString()+".zip" New-Item -ItemType Directory -Force -Path $temppath Get-ChildItem -Path $sourceFolder \| Copy-Item -Destination $temppath -Recurse Compress-Archive -Path (Get-ChildItem -Path $temppath).FullName -DestinationPath $destinationArchive -Force Remove-Item -Path $temppath -Force -Recurse start-sleep -s 5 } if (Test-Path ($site.physicalPath.ToString()+"\Lanteria.ApplicantSelfService.App.exe")){ $sourceFolder = $site.physicalPath.ToString() $destinationArchive = $backupFolder+$site.Name.ToString()+".zip" New-Item -ItemType Directory -Force -Path $temppath Get-ChildItem -Path $sourceFolder \| Copy-Item -Destination $temppath -Recurse Compress-Archive -Path (Get-ChildItem -Path $temppath).FullName -DestinationPath $destinationArchive -Force Remove-Item -Path $temppath -Force -Recurse start-sleep -s 5 } } | | --- | 3. Next, in the **Task Scheduler**, create a task and name it **CaSS Backup**. ![](https://cdn.document360.io/c315c68d-2799-4fcc-9a39-084315b58f14/Images/Documentation/img814.png) 4. On the **General** tab, select the **Run whether user is logged on or not** option. 5. Select the **Run with highest privileges** check box. 6. On the **Triggers** tab, click New and create a **Daily** trigger. Set the recurrence to every 1 day, specify the date and time for the task to be started and select the **Enabled** check box. ![](https://cdn.document360.io/c315c68d-2799-4fcc-9a39-084315b58f14/Images/Documentation/img815(1).png) 7. On the **Actions** tab, click **Edit** for **Start a program** and specify the following path to the PowerShell script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe *Note**The script is in the network folder of the AS+SQL server.*![](https://cdn.document360.io/c315c68d-2799-4fcc-9a39-084315b58f14/Images/Documentation/img816.png) 8. Click **OK** to save the task.