Can anyone tell if it is possible to run different scripts for each virtual sub client? The documentation is not clear about this feature and only mentions some parameters that can be used, however, does not explain how they should be used. I believe I should use parameter 3 - File backup group - but the documentation also does not mention this term at any other time.
I really need some help to make this work, but I’m totally lost as to the operation of these parameters, could someone explain me better, please?
What would it be “File backup group” and how do I define them?
How to use this parameter to run specific scripts for each virtual sub client?
UrBackup is an excellent tool and fulfills almost every need, and I take the opportunity to thank the developers and the community for this, but without the possibility to configure different prefilebackup scripts for each virtual client, it will probably become impractical for my needs.
I hope it’s possible and someone can show me the way.
My clients are Windows and I was able to adapt your suggestion to it. Received as return “Name of the virtual sub client | 100”. I’m feeling happy with this first step, but I still have no idea how to configure this in UrBackup.
Just to be clear, I was able to print the file backup group with the adapted command for Windows client:
echo SELECT virtual_client, group_offset FROM virtual_client_group_offsets; | sqlite3 “C:\Program Files\UrBackup\urbackup\backup_client.db”
The point is that I did not understand how I should use the 3 available parameters (1: “0” for full backup “1” for incremental file backup 2: Server token 3: File backup group). Where and how should I enter parameters? How I am going to run different scripts for virtual sub clients if UrBackup works with only one prefilebackup batch file?
“echo $1”, “echo %1” or “echo %%1” doest not bring any result, both on Windows and Linux clients.
I’m so confused about it, could you please give us an example of this configuration? The example in PostgreSQL documentation did not help much.
Got it!! Parameters only work when backup job is running, that’s why echo tests at CMD did not give any results. Just added the line below at the start of the script and now it runs only on the defined group:
if %3 NEQ 200 GOTO:EOF
Using IF and ELSE conditions makes possible to run different commands on different virtual sub clients, but always inside the same prefilebackup.bat file, did I get it right?
i need help for linux client. I’ve recovered the value from DB (100) for the virtual client copying the file to my pc and open with sqlitebrowser on windows. If i run the command echo “SELECT virtual_client, group_offset FROM virtual_client_group_offsets;” | sqlite3 /usr/local/var/urbackup/backup_client.db i get this:
Error: near line 1: malformed database schema (hardlinks) - near “WITHOUT”: syntax error
(The client is newly installed)
I also need to have a prebackupl script for sub clients. Running below in command window or powershell with or without a backup running I get errors. I ran it from the target client and the server with and without backup of the target client running. What am I doing wrong?
echo “SELECT virtual_client, group_offset FROM virtual_client_group_offsets;” | sqlite3 /usr/local/var/urbackup/backup_client.db
C:>echo “SELECT virtual_client, group_offset FROM virtual_client_group_offsets;” | sqlite3 /usr/local/var/urbackup/backup_client.db
‘sqlite3’ is not recognized as an internal or external command,
operable program or batch file.
C:>echo SELECT virtual_client, group_offset FROM virtual_client_group_offsets; | sqlite3 “C:\Progra
At line:1 char:77
… ual_client, group_offset FROM virtual_client_group_offsets; | sqlite3 …
An empty pipe element is not allowed.
+ CategoryInfo : ParserError: ‘(:)’ , ParentContainsErrorRecordException
+ FullyQualifiedErrorId : EmptyPipeElement"