show files of a job?

60 views
Skip to first unread message

Sven Gehr

unread,
Nov 2, 2019, 3:47:36 AM11/2/19
to bareos-users
hello everyone,

I have the problem that the daily backup (INC) of a client requires a lot of backup memory.

Now I want to see which files have been backed up within a job to understand the behavior.

How can I do this?

best regards
sven

Sven Gehr

unread,
Nov 2, 2019, 4:17:09 AM11/2/19
to bareos-users
or is it possible to export the file list of a job including file sizes into a csv file to evaluate it?

Jörg Steffens

unread,
Nov 2, 2019, 5:36:00 AM11/2/19
to bareos...@googlegroups.com
On 02.11.19 at 09:17 wrote Sven Gehr:
> or is it possible to export the file list of a job including file sizes
> into a csv file to evaluate it?

You got a number of options for this:

bconsole:
list files jobid=...

You can also use the bconsole "restore" command to get the file
information. The "dir" in the restore tree show you also the file sizes.

Using https://github.com/bareos/bareos-fuse you can also mount your
backup metadata into your normal filesystem.

The bconsole command
estimate listing job=<JOBNAME> level=Incremental
shows you in advance which files would get backed up.

Generally you can redirect the output of bconsole by "@output
/tmp/output.txt". However, this will be in same format as the normal
output, so no CSV.

Using
https://github.com/bareos/bareos/tree/master/python-bareos#use-json-objects-of-api-mode-2
you can retrieve data as a Python structure. However, not all bconsole
commands supports this. But it works for the "list" command.

Regards,
Jörg


--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
http://www.bareos.com Fax: +49 221 630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer:
S. Dühr, M. Außendorf, Jörg Steffens, P. Storz

Sven Gehr

unread,
Nov 4, 2019, 2:37:59 AM11/4/19
to bareos-users


Am Samstag, 2. November 2019 10:36:00 UTC+1 schrieb Jörg Steffens:
On 02.11.19 at 09:17 wrote Sven Gehr:
> or is it possible to export the file list of a job including file sizes
> into a csv file to evaluate it?

You got a number of options for this:

bconsole:
list files jobid=...

You can also use the bconsole "restore" command to get the file
information. The "dir" in the restore tree show you also the file sizes.

yes, but I'm familiar with these possibilities:

bconsole:
list files jobid=...

I don't see any file size.

In the restore-tree I see the size but no total size. Furthermore it was very cumbersome to open the whole tree to check the size.

 

Using https://github.com/bareos/bareos-fuse you can also mount your
backup metadata into your normal filesystem.

which package do I need to install on the ucs-server (4.4.2) to use this? "python-bareos" ?

 

The bconsole command
estimate listing job=<JOBNAME> level=Incremental
shows you in advance which files would get backed up.

ok, I hadn't seen that I can also specify the backup level for "estimate ...". That helps me already times

 

Generally you can redirect the output of bconsole by "@output
/tmp/output.txt". However, this will be in same format as the normal
output, so no CSV.

good to know, too. I looked in the documentation and the spelling is not quite clear to me:

"@output <filename> <w|a>
    Send all following output to the filename specified either overwriting the file (w) or appending to the file (a). "

What's <w|a>? The Bareos Command? I want to redirect the command "llist files jobid=2731" to the file /tmp/output.txt. How do I enter it?

Spadajspadaj

unread,
Nov 4, 2019, 3:49:53 AM11/4/19
to bareos...@googlegroups.com

Hi Sven.

I'd go for joining info from File and Path tables in bareos database selecting by File.JobId. For size you'd need to decode LStat field of File Table (I'm pretty sure I'd seen some decoders somewhere on the Internet).


Best regards

MK

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/9a2dbdcb-06e5-410b-acac-fbe41525f4dc%40googlegroups.com.

Jörg Steffens

unread,
Nov 4, 2019, 4:54:08 AM11/4/19
to bareos...@googlegroups.com
On 04.11.19 at 08:37 wrote Sven Gehr:
[...]

> In the restore-tree I see the size but no total size. Furthermore it was
> very cumbersome to open the whole tree to check the size.

In the restore tree, you can use:
mark *
estimate

This outputs something like:
20 total files; 20 marked to be restored; 122,848 bytes.

You can also call "help" in the restore tree, to get the list of
possible commands.
>
> Using https://github.com/bareos/bareos-fuse
> <https://github.com/bareos/bareos-fuse> you can also mount your
> backup metadata into your normal filesystem.
>
>
> which package do I need to install on the ucs-server (4.4.2) to use
> this? "python-bareos" ?

Yes, but this is not sufficient. There is the bareos-fuse package in
http://download.bareos.org/bareos/contrib/. You can also install it
manually from github. In any case, you need the python-fuse package,
which is not available for all distributions. You may have to install it
manually (using pip).

[...]

> Generally you can redirect the output of bconsole by "@output
> /tmp/output.txt". However, this will be in same format as the normal
> output, so no CSV.
>
>
> good to know, too. I looked in the documentation and the spelling is not
> quite clear to me:
>
> "@output <filename> <w|a>
>     Send all following output to the filename specified either
> overwriting the file (w) or appending to the file (a). "
>
> What's <w|a>? The Bareos Command? I want to redirect the command "llist
> files jobid=2731" to the file /tmp/output.txt. How do I enter it?

@output /tmp/output.txt
llist files jobid=2731

You may better use:
@tee /tmp/output.txt
llist files jobid=2731

Using this, you see the output in the console as well as in the file.
Reply all
Reply to author
Forward
0 new messages