Running/completed backup check thru command line

Hi folks,

Is there a way to list backups done and running backups thru the command line? How?
Thank you in advance.
Ederson Santos

No commands? :thinking:

I’ve been watching hoping someone else had an answer, I don’t think so. I couldn’t find anything in registry. Only the log file which would probably require good parsing

You need to use a DB query. It’s a bit more than a simple command. As I recall, sqlite3 executable does not come directly with the install of either UrBackupServer or UrBackupClient. So you have to get that separately. Then you can query the DB with commands like these: "sqlite3 backup_server.db “select * from backup_images where complete like ‘1’ ;” or sqlite3 … “select … where complete like ‘0’ ;” The first with “complete like ‘1’ ;” will result in dozens and dozens of backups listing every complete backup that is stored on your machine. I’m not sure if it will not even list backups that have been removed. (IE the DB lists it as a complete backup but the actual file has been purged. The second with complete like ‘0’ will list backups that are in progress.

As you can see it’s more complicated than a simple “command.”

Some time ago another guru, Phillip Smith, posted a script “check_urbackup.sh” that runs on a linux machine that has been set up as a UrBackupServer. You can see how complex this can get. check_urbackup/check_urbackup.sh at master · fukawi2/check_urbackup · GitHub


Karl Hudnut

Am aware this is at somewhat of a tangent to the original request, but…

This is something that is visible from the web interface, very easily…why not just open your preferred internet browser and go to Activities to see what is going on and the recent (last 20) activities from the server…?

Failing that, you can go to the Backups page to see when the backups have been successfully completed per client, or the Logs page to review the logs from the backups…

Ok, I know it
I’m looking for commands in order to capture the backup status thru scritps to be show in another monitoring system.

…easily visible, but I too am trying to get alerts in my RMM system when urbackup hasn’t had a “successful” in the last x days to give me an alert.

1 Like

Getting the last backup time on the client:

cd "C:\Program Files\UrBackup"
UrBackupClient_cmd.exe status

last_backup_time is a unix timestamp (See also Integrate to RMM via query )

Some create Windows events from e.g. postfilebackup.bat ( A way to remote monitor backup status? - #9 by shieldedge ) and monitor that via RMM.

Directly from the server: GitHub - uroni/urbackup-server-python-web-api-wrapper: Python wrapper to access and control an UrBackup server (See example). Some have hooked this up with e.g. Nagios Nagios/Icinga2 check available

Directly from the sqlite db: In the backups, backup_images table. In backups table file backups with done=0 are currently runnning. In backup_images rows with complete=0 are currently running.

Create a custom alert script that integrates with monitoring software. Currently there is a script for Pulseway: urbackup_backend/alert_pulseway.lua at dev · uroni/urbackup_backend · GitHub That was thought of more of as an example with the hope that more integrations get contributed which hasn’t happened yet.

3 Likes