> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-best-practices-guide/v19/miscellaneous/backups.md).

# Backups

Parallels recommends setting up recurrent backups of Parallels RAS farm settings. This can be accomplished using Parallels RAS PowerShell, which is a part of Parallels RAS beginning with version 15.5.2. Parallels RAS PowerShell is installed by default when you install Parallels RAS. If you chose not to install it, please run the Parallels RAS installer again and install the Parallels RAS PowerShell component.

The following sample PowerShell script shows how to export Parallels RAS farm settings to a file.

```
#Get the current datetime to be used as a name for the backup file.
#You can use any other unique name format that you like.
$Date = Get-Date -Format yyyy.MM.dd.mm.ss

#Import the Parallels RAS PowerShell module.
Import-Module RASAdmin

#Create a Parallels RAS session.
#Since the password must be passed as SecureString, we need to convert it first.
#In your own script, replace "secret" with your Parallels RAS password.
$Pass = "secret" | ConvertTo-SecureString -AsPlainText -Force

#We can now create a Parallels RAS session.
#Replace "user" and "server.company.dom" with your RAS user and server names.
#If executing the script locally, you can omit the -Server parameter. 
New-RASSession -Username "user" -Password $Pass -Server "server.company.dom"

#Export farm settings to a file.
#You can specify a different folder for saving the file if you wish.
#.dat2 is the default extension Parallels RAS uses for backup files.
Invoke-RASExportSettings $env:userprofile\$Date.dat2

#Close the current RAS session.
Remove-RASSession
```

Save the above sample script to a file with the ".ps1" extension. To test the script, you can execute it in the PowerShell console. To execute the script on a schedule, do the following:

1. Open Windows Scheduler and click **Create Task**.
2. On the **General** tab page of the **Create Task** dialog, fill in all required fields.
3. Select the **Actions** tab page and then click the **New** button.
4. In the **New Action** dialog, make sure **Start a program** is selected in the **Action** drop-down list, then click **Browse** and select your .ps1 script file.
5. Click **OK** in the **New Action** dialog.
6. Select the **Triggers** tab page and click **New**.
7. In the **New Trigger** dialog, specify the desired schedule settings.
8. Click **OK** to close all dialogs.

To import the settings from a saved file into a Parallels RAS farm:

* In the Parallels RAS Console, navigate to **Administration** \ **Backup** and click **Import**. Specify the ".dat2" file to import the farm settings from.
* Using Parallels RAS PowerShell, execute the `Invoke-RASImportSettings` cmdlet passing the path and filename of the backup file.

The complete Parallels RAS PowerShell documentation can be viewed and downloaded from <http://www.parallels.com/products/ras/resources/>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.parallels.com/landing/ras-best-practices-guide/v19/miscellaneous/backups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
