Showing results for 
Search instead for 
Did you mean: 

Dynamically adjust policy's backup selection to match modified file name before run

Level 3

Every time we have to manually change the files name  in the backup selection list before run. is there a way to do it dynamiclly with script?

the file name appended with some new numbers every week.



Level 6
Employee Accredited

You can a file selection to a policy like this :

bpplinclude mypolicy -add "/etc/hosts"

and delete a selection ...

bpplinclude mypolicy -delete "/etc/hosts"

... does this help

Will give a try and see how it works.

Partner    VIP   

Can you give us a example of why you need to do this ?

if you have paths that are dynamic, put those file under a directory that is static and doesn't change. Put the static part in the policy.

maybe what I said is not clear, here is a example

we have a policy backing up lots of files under different folders:


           abc20190116.txt    -->need to backup(random created by other program)



          efg.bak                    -->need to backup

         cde.bak                    -->need to backup


so the backup selection will be: c:\folderA\ abc20190116.txt


the problem is file with current timestamp under folderA will be changing next day to abc20190117.txt something like that. no pattern to follow.

it take lots of time to manually change the backup selection list, so I am looking for a way to dynamically change the selection list to match the lastest  backup file name.                                                    

Level 6
Partner    VIP    Accredited Certified

If those new files are being created with a script then you might just backup them up from that very script. Add "bpbackup <files-to-backup>" at the end of a script, or bparchive if you want the files to be deleted after the backup. You'll need user/archive schedules for this.

If every day you can produce a list of the specific files you need to backup, you can also execute "bpbackup -f <file-with-list-of-absolute-paths-for-backup>" instead.

More info on bpbackup:

thanks for the info.