1 of 1 people found this helpful
Typically, do not use the piartool -backup commands to start a backup directly. Instead, use the PI Data Archive backup scripts (pibackup.bat located in the pi\adm directory), which in turn run the necessary piartool -backup commands. For on-demand backups, you can use the Backup tool in the PI System Management Tools (PI SMT) instead of the piartool -backup commands.
You can schedule the backup script with Windows task scheduler.
Could you please let us know your backup requirement?
As @Eugene Lee mentioned i would recommend pibackup.bat for scheduling your backup. You can create a schedule task using pibackup.bat and arguments based on your requirement. If i you are looking to configure daily backup i would recommend daily incremental backup and weekly fully backup.
Regarding piartool you can backup on demand.
piartool.exe -backup -identify -type incremental -verbose -excludeArchivesWithEndTimesOlderThan EndTime
Eugene Lee @lal we Tried using pibackup.bat script too but it didnt work.
I want to perform back up and numarch back i need daily it should capture only 2 archives in backup.
ex- Newly today it will take backup of two archives and tommorow also it should take the latest two archive backup. But what is happening is it is incrementing it daily. 2,3,4,5....
The behavior of numarch parameter is as such.
If -numarch N is specified for an incremental or differential backup (-type INCREMENTAL or -type DIFFERENTIAL), the first N archives plus any other archive that has been modified are included in the backup. The -numarch flag has no effect on a full backup.
Please see the link below for more information.
I wanted to exclude the archive files(inc Future) from the scheduled backup and ran into the fact that with pibackup it does not work. With pibackup the numarch is ignored, resulting in backup up the arc files anyway.
But with piartool it does work.
DOES NOT WORK: Pibackup.bat "C:\Temp\PIBackup" -copy -excludeFuture -NUMARCH 0
DOES WORK: piartool -backup "C:\temp\PIbackup" -type COPY -arcdir -excludeFuture -numarch 0