As WFA becomes a important portion of the your infrastructure you may find that automated backup are important to your organization. Here is one method for performing these backups.
A backup.ps1 script exists within the C:\Program Files\NetApp\WFA\bin folder for completing these backups however I found that a few customizations helped ensure the backup process is bulletproof.
First create a copy of the script named backup_cust.ps1 this will be the script you modify.
Modify the defaults in the parameter section. This will allow the script to run without additional switch parameters. I have included the password directly in this script, if that is not acceptable you may want to export the credentials to a file. Here is one example of how to do this http://halr9000.com/article/tag/lib-authentication.ps1.
Open the script with notepad or a similar text editor.
Starting at line 3 to 11 changes are in bold and red
The backup user is a valid wfa user and password.
param
(
[parameter(mandatory=$false, HelpMessage='The user name about to perform the backup')]
[String]$User="BackupUser",
[parameter(mandatory=$false, HelpMessage='The password of the user about to perform the backup')]
[String]$Password="BackupPassword",
[parameter(mandatory=$false, HelpMessage='The full path of the directory to which the backup should be saved')]
[String]$Path="\\mynetapp\HA_SHARE\WFA_backup"
)
The script automatically uses a single file for backup however, it may be desirable to maintain a history modify the following lines to add a date time code to the file name.
Try {
# Create the entire directory structure if not already present, suppress unnecessary output
New-Item $Path -type directory -force | Out-Null
$client.DownloadFile("http://localhost:"+$httpPort+"/rest/backups", $Path+"/$(get-date -f yyyy-MM-dd-hh-mm)_wfa_backup.sql.gz")
Write-Output "Backup created at location : "
Write-Host -BackgroundColor "Green" -ForegroundColor "Black" $Path+"/$(get-date -f yyyy-MM-dd-hh-mm)_wfa_backup.sql.gz"
}
Save the file and test the modified script using a powershell window.
&"C:\Program Files\NetApp\WFA\bin\backup_cust.ps1"
Once validated create a scheduled task.
powershell -file "C:\Program Files\NetApp\WFA\bin\backup_cust.ps1"
Thats it! Monitor you are getting regular backups.
[Extra Credit] A cleanup script may be needed at some point to reduce the total number of backups.