Issue
The default location of database backups is ...\config\cfg\DBBackups\ folder. In some cases, the backup location has to be moved to a different drive due to storage space or company policy.
Product Line
Power Monitoring Expert 7.2.x
Power Monitoring Expert 8.x
Power Monitoring Expert 9.0
Power Monitoring Expert 2020
Power Monitoring Expert 2021
Power Monitoring Expert 2022
Power Monitoring Expert 2023
Environment
Windows PowerShell script file
Related Articles
FA230476: Basic PowerShell Commands
FA230577: Database Scheduled Task Files and Supporting Files
Cause
The PowerShell script, Configuration.ps1, contains the configuration information for scheduled tasks related to maintaining the ION databases.
The default path for the configuration file is 'Power Monitoring Expert\config\cfg\DbScheduledTasks\Support\'.
Configuration.ps1 contains the parameter, $locationForBackupFiles, which specifies the location where the backup jobs will save the database backups.
By default this parameter is set to: $locationForBackupFiles = "cfg\DBBackups\"
Therefore, the default location of the database backups is 'Power Monitoring Expert\config\cfg\DBBackups\'.
Resolution
*Warning: Take backups of any files prior to modifying them. Ensure the backups are in a location that will not be overwritten (i.e. the Desktop).
To change the location where the backup scheduled jobs save the backup files to, simply modify the setting, $locationForBackupFiles, to the desired path using a word processor such as Notepad++ .
There are two ways of specifying where to save the backups:
- Full Path: This means that a full, rooted path is entered.
- "C:\Program Files\SomeFolder\"
- "D:\Data\Backups\"
- \\NetworkFolder\MyFiles
- "D:\Backups\"
- Relative (non-rooted) Path: This means that you want the backups to be saved to a folder within the installation folder, and under Config folder.
- "MyFolder\Backups\Databases\"
- "backups\"
- "DB Backups"
If the desired location is "\config\cfg\DB Backups", then Configuration.ps1 would be cg such that $locationForBackupFiles = "DB Backups"
Note: In both cases, new subfolders are created and named based on the database.
IMPORTANT
The IONMaintenance user must be granted 'Modify' permissions to the destination folder. If the location is the default PME installation folder, this step is not necessary.
The IONMaintenance user or a group that the IONMaintenance user is a member of must be added to the "Log on as batch job" user right assignment in the local security policies.
- In Windows Explorer, highlighted the new backup directory you just created: right-click > properties, choose the 'Security' tab
- Click 'Edit' > 'Add' and the 'Select Users or Groups' window will open. Type 'IONMaintenance' > click 'OK'
- Highlight the 'IONMaintenance' user and check 'Modify' permission. Click Apply > click OK.
- Click 'OK' to leave the Security window. Click OK to close the 'Properties' window.