Hi Jen,

I guess you already verified that you didn't forget to update the database 
schema and the privileges ?
either with dbconfig or manually by applying the manual script 
update_bareos_tables and grant_bareos_privileges

```
Enter SQL query: select * from version;
+-----------+
| versionid |
+-----------+
|     2,230 |
+-----------+
```

Otherwise I wonder what kind of output you are expecting with 
list jobid=9999 hours=24

Aren't you looking for `show me the jobs run in the last 24 jours`
which is 
list jobs hours=24 

For example here with a 23 version

Using your command give me the right result
*list jobid=14970 hours=24
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| jobid | name    | client  | starttime           | duration | type | level 
| jobfiles | jobbytes    | jobstatus |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| 14970 | catalog | yoda-fd | 2024-01-05 07:02:01 | 00:00:06 | B    | F     
|      272 | 770,112,797 | T         |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+

Show me the jobs for specific jobname during the last 48 hours.

*list jobs jobname=catalog hours=48
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| jobid | name    | client  | starttime           | duration | type | level 
| jobfiles | jobbytes    | jobstatus |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| 14961 | catalog | yoda-fd | 2024-01-04 07:02:02 | 00:00:08 | B    | F     
|      272 | 767,798,259 | T         |
| 14970 | catalog | yoda-fd | 2024-01-05 07:02:01 | 00:00:06 | B    | F     
|      272 | 770,112,797 | T         |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+

While trying to ask for a specific jobid will always return non or one 
result.

*list jobid=14970 hours=48
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| jobid | name    | client  | starttime           | duration | type | level 
| jobfiles | jobbytes    | jobstatus |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+
| 14970 | catalog | yoda-fd | 2024-01-05 07:02:01 | 00:00:06 | B    | F     
|      272 | 770,112,797 | T         |
+-------+---------+---------+---------------------+----------+------+-------+----------+-------------+-----------+

Regards
Le mercredi 3 janvier 2024 à 09:30:52 UTC+1, jens.gr...@gmail.com a écrit :

> Hi guys,
>
> I'm using Version: 23.0.1~pre7.606b211eb (19 December 2023)
>
> The following command does not work after I upgraded my server to Debian 
> 12 and the database from postgres 13 to 15:
>
> *list jobid=36197 hours=24
> You have messages.
> *m
> 03-Jan 08:54 bareos-dir JobId 0: Fatal error: cats/sql_list.cc:593 
> cats/sql_list.cc:593 query SELECT DISTINCT Job.JobId,Job.Name, Client.Name 
> as Client, Job.StartTime, CASE WHEN Job.endtime IS NOT NULL AND Job.endtime 
> >= Job.starttime THEN Job.endtime - Job.starttime ELSE CURRENT_TIMESTAMP(0) 
> - Job.starttime END as Duration, 
> Job.Type,Job.Level,Job.JobFiles,Job.JobBytes,Job.JobStatus FROM Job LEFT 
> JOIN Client ON Client.ClientId=Job.ClientId LEFT JOIN JobMedia ON 
> JobMedia.JobId=Job.JobId LEFT JOIN Media ON JobMedia.MediaId=Media.MediaId 
> LEFT JOIN FileSet ON FileSet.FileSetId=Job.FileSetId WHERE Job.JobId > 0 
> AND Job.JobId=36197AND Job.SchedTime > '2024-01-02 08:54:37'  ORDER BY 
> StartTime;  failed:
> FEHLER:  Müll folgt auf numerische Konstante bei »36197A«
> ZEILE 1: ...d=Job.FileSetId WHERE Job.JobId > 0 AND Job.JobId=36197AND J...
>
> Seems like the missing blank between the JobId and the `AND` in the 
> SQL-command is causing the trouble. Running the command without `hours=24` 
> works as expected:
>
> *list jobid=36197
>
> +-------+-------------------------------------------+------------------------------------+---------------------+----------+------+-------+----------+----------+-----------+
> | jobid | name                                      | client               
>               | starttime           | duration | type | level | jobfiles | 
> jobbytes | jobstatus |
>
> +-------+-------------------------------------------+------------------------------------+---------------------+----------+------+-------+----------+----------+-----------+
> | 36197 | backup-laptop-XXXX-fd | laptop-XXXX-fd | 2024-01-02 09:07:08 | 
> 00:00:02 | C    | I     |        1 |       81 | T         |
>
> +-------+-------------------------------------------+------------------------------------+---------------------+----------+------+-------+----------+----------+-----------+
>
> Does anyone know what could be the reason for this?
>
> btw: I'm using this command inside a python script to regularly backup 
> remote clients.
>
> Greetings, Jens
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/983b2900-f381-44b0-9f70-de0f1c4c1808n%40googlegroups.com.

Reply via email to