Virtual sub client separate pre-/postfilebackup script


Is it possible to have separate pre-/postfilebackup scripts for normal and virtual sub client?


Currently only via the third parameter “index group” which is 0-99 for the normal client 100-199 for the first virtual client etc.

Thanks for the information. I will test it :wink:
I suppose that this is the same as the in the doc mentioned 3rd parameter “file backup group”
What exactly does this represent? (sadly not much in the docs :wink: )

I have the same question - how are these parameters used? Can we get an example? The table in the doc does not sufficiently explain how to use parameters with the batch files.

E.g. the postgres pre and post file backup scripts:

1 Like

I tried using the parameters on a Windows client in various ways. I tried %1, %2, etc, tried %%1, %%2, etc, and tried $1, $2, etc, and all I see in the output is the variables, not the values. Before anyone point this out, I know that %%1 is the correct way to use a variable in a Windows Batch file, and $1 is correct for Linux systems, but I tried all three forms just to make sure it wasn’t hard-coded somewhere in the UrBackup executable.

Here is a sample prefilebackup.bat file from a Windows 10 workstation:

EVENTCREATE /T INFORMATION /L APPLICATION /SO UrBackup /ID 101 /D "File Backup Parameter 1 $1 Parameter 2 $2 Parameter 3 $3"

I just entered the variables this way to see what output I would get in the Windows Event Log. and like I said above, I tried various syntax for the variables, and what I get in the Event Log is this:

File Backup Parameter 1 $1 Parameter 2 $2 Parameter 3 $3

So clearly the value of the variable is not being passed.

Another related item. In the postgress example, you state that a variable can be used in a post file backup script /usr/local/etc/urbackup/postfilebackup. But in the admin manual, in the chart, it states that in the postfile- and postimage- scripts parameters are not used on the client. Unless these scripts are used on the Urbackup server, but the postgress example doesn’t make that clear. And if they are, then the naming convention from the postgress example doesn’t match the chart - the server scripts have underscores in them, the client ones do not. Just trying to get clarification.

Thank you!

@uroni, Can you see what I’m using wrong above trying to use the parameters from the documentation?

Bumping this topic again. I really want to learn how to work with these variables, so I can integrate the backup with my RMM tool.

@Flatlinebb @uroni

This is very interesting, I am trying to integrate the backup status of my Windows clients with my RMM using the post backup files, but with no results at the moment.
There isn´t enought documentation or samples to know how exactly this feature works.
Any help would be appreciated.

1 Like