Alain Spineux [Mon, 12 Mar 2018 16:29:02 +0000 (17:29 +0100)]
win32: Tweak Makefile to handle dependencies
- the dependencies where ignored because the target was wrong
before > main.o obj64/main.d: main.cpp who.h ../libwin32/main.cpp
after > obj64/main.o obj64/main.d: main.cpp who.h ../libwin32/main.cpp
the "obj64" "prefix allows make to find the rule when building
obj64/main.o
- adding "-" to "include" shut up missing .d files at first compile
Alain Spineux [Mon, 26 Mar 2018 10:09:16 +0000 (12:09 +0200)]
win32: Makefile add winfiled target + NOTPARALLEL
- the .NOTPARALLEL option just disable the "-j" option effect at the
level of the Makefile to keep it sequential. The "-j" will be passed
to sub-level Makefile
- the new target allow to quickly RE-build the client when all files
have been already compiled once.
- A quick way to build the client :
use "make win64=yes bat=no winfiled -j 4" to quickly build the client
- this is not 100% reliable, but very convenient for faster development
of the client.
- run the command twice to be sure.
- for the build of the package does as usual, don't use "-j"
Norbert Bizet [Wed, 3 Nov 2021 13:30:10 +0000 (09:30 -0400)]
cloud: Fix #8265 Do not re-open part.1 during truncate
Whem using glacier, if we re-open the part.1 after the truncate,
bacula might have to wait 3 days to get the part.1 from the cloud
to finally truncate it as well. During this call, the SD is locked
and all jobs are blocked.
Michal Rakowski [Sun, 14 Feb 2021 22:31:15 +0000 (23:31 +0100)]
Fix #7319 Introduce 'du' command inside restore menu
Description:
-----------
Restore menu's du commands mimics Linux 'du' commands in terms that it
simply sums size of all files in directories below. For files, it simply
prints it's sizes.
TREE_NODE`s delta_seq size was reduced to int16_t since we don't expect
it to be any bigger at all while it reduced struct`s size a little bit
(it was still expanded by the `size` filed though).
Reintroduced missing 'if(job)' case for get_job_storage, so that it
works for both 'run' and 'job' arguments provided.
Removed unneded get_job_storage() call from get_storage().
This callback implements a direct query on accurate database.
To make a query you need to provide `fname` in `accurate_attribs_pkt`
parameter struct. Then you will get response at other struct fields.
This patch implements a basic accurate mode query to the metaplugin
protocol. In this extension the backend can issue `CHECK:$fname`
command followed by a standard `STAT:...` and `TSTAMP:...` commands
to ask Bacula if it should backup $fname in this job.
The metaplugin will response with simple "OK", you should backup this
file or "SEEN" it before, backup is not required. This feature will work
with Accurate jobs only. If job is not accurate then user will get
an error job message.
Alain Spineux [Fri, 20 Aug 2021 11:52:43 +0000 (13:52 +0200)]
add built-in hexdump to bsnprintf()
- sample
char hash[MAX_HASH_SIZE];
int hash_size=32;
/* notice that the length is the length in the output "buffer" not the
length of the input buffer. This is like in any printf() "length"
any char in the input will generate 2 digit in the output, you must
multiply by 2 the size of the input buffer or get a small output!
It is safe because bnsprintf() knows the length of its output buffer
and truncate any overload
*/
Mmsg(0, "the hash is :%64W", hash); // fixed size
Mmsg(0, "the hash is :%*W", 2*hash_size, hash); // variable size
Michal Rakowski [Fri, 6 Aug 2021 16:35:46 +0000 (18:35 +0200)]
Fix compilation warning in storage manager to get rid of 'initialzer lists' warning
Description:
when using:
mutex = PTHREAD_MUTEX_INITIALIZER;
instead of:
pthread_mutex_init(&mutex, NULL);
There could be warning on some environments:
store_mngr.c:31:10: warning: extended initializer lists only available
with -std=c++11 or -std=gnu++11 [enabled by default]
mutex = PTHREAD_MUTEX_INITIALIZER;
To get rid of it, simply use the init/destroy mutex helpers.
Eric Bollengier [Fri, 6 Aug 2021 15:50:14 +0000 (17:50 +0200)]
docker: Check the presence of the docker tools duing loadPlugins()
If the plugin is installed without the tools, the status client command
is broken.
*st client
Automatically selected Client: centos7-64-fd
Connecting to Client centos7-64-fd at centos7-64:9102
Failed to connect to Client centos7-64-fd.
====
You have messages.
*m
06-Aug 02:47 centos7-64-dir JobId 0: Fatal error: File daemon "centos7-64-fd" rejected Job command: docker: Unable to use command tool: /usr/bin/docker Err=No such file or directory
Eric Bollengier [Thu, 5 Aug 2021 09:43:21 +0000 (11:43 +0200)]
regress: Fix console-acl-test
With the new features of the "list jobmedia" command (filter by jobid),
the command used in the script "list jobmedia jobid=1" now works as
expected and is returning only one record instead of everything.
Eric Bollengier [Thu, 5 Aug 2021 09:06:19 +0000 (11:06 +0200)]
Fix SQL query generated with ACLs
Issue reported by the console-acl-test
05-Aug 10:59 localhost-dir JobId 0: bdb.h:141 SELECT JobId,Media.VolumeName,FirstIndex,LastIndex FROM JobMedia JOIN Media
USING (MediaId) JOIN Job USING (JobId) JOIN Client USING (ClientId) JOIN Pool USING (PoolId) LEFT JOIN FileSet USING (
FileSetId) WHERE (Client.Name IN ('localhost-fd')) ORDER BY JobMediaId ASC
05-Aug 10:59 localhost-dir JobId 0: Fatal error: bdb.h:141 bdb.h:141 query SELECT JobMediaId,JobId,Media.MediaId,Media.VolumeName,FirstIndex,LastIndex,StartFile,JobMedia.EndFile,StartBlock,JobMedia.EndBlock FROM JobMedia JOIN Media USING (MediaId) JOIN Job USING (JobId) JOIN Client USING (ClientId) JOIN Pool USING (PoolId) LEFT JOIN FileSet USING (FileSetId) WHERE (Client.Name IN ('localhost-fd')) ORDER BY JobMediaId ASC failed:
ERROR: common column name "poolid" appears more than once in left table
The Pool restriction was introduced recently and is not mandatory.