[Solved] Export list of failed backup

Unimus support forum
Post Reply
abdulg
Posts: 1
Joined: Mon Mar 07, 2022 10:20 pm

Mon Mar 07, 2022 10:27 pm

Hi all,

Our Unimus has 9.5K devices in there and we have a large list of "failed jobs"

I cannot seem to find a way to export a list of backups that failed, so we can group them together and investigate why.

Is this possible in any way or is there a better way to achieve what I am trying to do?

Many thanks!
Vik@Unimus
Posts: 198
Joined: Thu Aug 05, 2021 6:35 pm

Thu Mar 10, 2022 3:40 pm

Hello,

We don't currently have the functionality directly in UI to perform such export, however this is already possible using both, API and/or by querying the database (in case your Unimus is running an external DB and not the built-in HSQL). Let me also throw examples below

1. API call - Devices - get devices

https://wiki.unimus.net/display/UNPUB/F ... getdevices

Code: Select all

curl -H "Accept: application/json" -H "Authorization: Bearer <token>" "http://<example.unimus>/api/v2/devices?page=0&size=20&attr=s,c"
This would output a list of devices you can then format to have only the devices with a FAILED last job status. This won't provide specifics of the failure, though.

2. DB query

Code: Select all

select info,error_log from device_history_job where successful=0;
This would output both, device address, and the same type of error message as if you clicked the red button icon in the Last job status column, but this might require some extra filtering to output only results newer than some date (date in the table is in the Unix time format in the create_time column).
As always, be careful when working with a database directly to not perform any unwanted/accidental changes; and create a backup beforehand.
Post Reply