]> git.ipfire.org Git - thirdparty/bacula.git/log
thirdparty/bacula.git
4 years agoBEE Backport bacula/src/stored/vol_mgr.c
Eric Bollengier [Tue, 12 May 2020 19:24:06 +0000 (21:24 +0200)] 
BEE Backport bacula/src/stored/vol_mgr.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Aug 1 21:44:04 2013 +0200

    Fix many auto label bug #8013

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Nov 27 20:24:25 2012 +0100

    Fix previous commit

4 years agoBEE Backport bacula/src/stored/vbackup.c
Alain Spineux [Tue, 12 May 2020 19:23:52 +0000 (21:23 +0200)] 
BEE Backport bacula/src/stored/vbackup.c

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/stored/tape_dev.h
Git Backport Process [Tue, 12 May 2020 19:23:26 +0000 (21:23 +0200)] 
BEE Backport bacula/src/stored/tape_dev.h

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Feb 9 12:43:16 2014 +0100

    Define classes for most device types

4 years agoBEE Backport bacula/src/stored/tape_dev.c
Kern Sibbald [Tue, 12 May 2020 19:23:24 +0000 (21:23 +0200)] 
BEE Backport bacula/src/stored/tape_dev.c

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/stored/stored_conf.h
Alain Spineux [Tue, 12 May 2020 19:23:06 +0000 (21:23 +0200)] 
BEE Backport bacula/src/stored/stored_conf.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 5 12:00:41 2020 +0100

    Fix *json segfault on OpenBSD

    In memcpy(&res_all, res, sizeof(res_all));

    The res_all is likely bigger than res itself. We
    copy too much data, and on OpenBSD, we get segfaults.

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Nov 20 13:32:52 2019 +0100

    dedup: detect and report dedupengine startup failure

    - 2 cases to handle
      - cannot load the driver
      - error at the dedupengine creation time or startup
    - the error message is stored in the dedup ressourse
    - see regress/tests/dedup-start-fail-test for more

    # Conflicts:
    #       bacula/src/stored/dircmd.c

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Nov 15 09:12:29 2019 +0100

    cloud: Rename TransferRetentionDays to TransferRetention (expressed as a time)

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Jun 6 11:59:15 2019 +0200

    Fix #3987 Scrub limit set in the storage{} not taken into account

    - we were using two different variables

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:33 2019 +0200

    PSK: Add new "TLS PSK Enable" directive to all resources

    - add the field to the resources
    - create default "psk_ctx" CONTEXT for each of them at startup

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 6 17:14:02 2018 +0200

    Add SSDDirectory resource to the Storage Daemon

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon May 1 09:39:57 2017 +0200

    dedup: Add directive Storage::DedupCheckHash to control the rehydration control. Default is no.

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Sep 28 16:44:27 2016 +0200

    dedup: add MaxContainerSize directive to SD ( FIX #1728 )

    - this directive must limit the size of the container
    - add max_container_size to bacula-sd.conf and to BucketManager
    - new method BucketManager::grow0() like grow() but without any lock
    - new method BucketManager::add_buckets() that add a bucket
    - new method BucketManager::can_grow_more() that tell if a bucket can grow
    - allocate the max size (511 entries) for the container table
      (this is the maximum for standard 64K header)
    - use BucketManager::alloc_block() instead of Bucket::alloc_block() to alloc chunks
      BucketManager::alloc_block() will handle the choice of the bucket, extend or
      create a new one when required.
    - use Bucket::capacity() instead of ba.size
    - dedup: link extra container together and keep ba.size < max_container_bidx
      . container of the same max_blocksize are linked
      . the head is got by BucketManager::choose_bucket()
      . the current container is head->current
      . they can be iterated up to NULL vi head->current->next
      . ba.size is kept < max_container_bidx by grow0()
        (I started doing a "runtime" limitation in alloc_block())
      . brc32 must use the right size (ba.size,max_container_bidx) at startup
      . add_buckets() return a bucket and handle "md_fsmonly"
    - extend clone_fsm() to handle extra containers
    - extend BucketManager::alloc_block() to keep vacuum_fsm geometry in sync
    - add a lock parameter to BucketManager::get_bucket(blockaddr addr, bool lck=true)
    - new method DedupEngine::vacuum_mark0() with a lock parameter
    - can modifying MaxContainerSize at any time
     . containers that are already bigger than the new value will no grow anymore
     . container that are smaller than the new value will continue to grow
    - add bucketmanager::Check

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Sep 1 20:16:25 2016 +0200

    First cut Cloud resource for SD Device

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon May 2 09:29:57 2016 +0200

    Add an option to configure the FileMedia record interval

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu May 8 10:09:13 2014 +0200

    Redefine SD dedup directives

Author: Alain Spineux <alain@baculasystems.com>
Date:   Sun Apr 6 20:05:35 2014 +0200

    Beginning of dedup code

4 years agoBEE Backport bacula/src/stored/stored_conf.c
Alain Spineux [Tue, 12 May 2020 19:22:57 +0000 (21:22 +0200)] 
BEE Backport bacula/src/stored/stored_conf.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 5 12:00:41 2020 +0100

    Fix *json segfault on OpenBSD

    In memcpy(&res_all, res, sizeof(res_all));

    The res_all is likely bigger than res itself. We
    copy too much data, and on OpenBSD, we get segfaults.

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Nov 20 13:32:52 2019 +0100

    dedup: detect and report dedupengine startup failure

    - 2 cases to handle
      - cannot load the driver
      - error at the dedupengine creation time or startup
    - the error message is stored in the dedup ressourse
    - see regress/tests/dedup-start-fail-test for more

    # Conflicts:
    #       bacula/src/stored/dircmd.c

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Nov 15 09:12:29 2019 +0100

    cloud: Rename TransferRetentionDays to TransferRetention (expressed as a time)

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 29 16:16:14 2019 +0100

    dedup: rename Dedup resource (and directive) into Dedupengine

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Oct 24 16:23:10 2019 +0200

    dedup: create a Dedup resource based on the dedup directive in Storage

    - to stay compatible with old dedup directive in the Storage resource

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Jun 6 11:59:15 2019 +0200

    Fix #3987 Scrub limit set in the storage{} not taken into account

    - we were using two different variables

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Apr 9 17:43:43 2019 +0200

    PSK: set default "TLS PSK Enable" to "no" when SSL is not available

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:33 2019 +0200

    PSK: Add new "TLS PSK Enable" directive to all resources

    - add the field to the resources
    - create default "psk_ctx" CONTEXT for each of them at startup

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Sun Jan 6 20:45:39 2019 -0200

    cloud: added Swift Cloud Plugin

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 1 17:33:35 2018 +0100

    cloud: Accept empty Hostname, SecretKey and AccessKey for Generic drivers

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 6 17:14:02 2018 +0200

    Add SSDDirectory resource to the Storage Daemon

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jul 26 10:27:31 2018 +0200

    cloud: Add google and oracle cloud directives handling

    driver files should be located in plugins_directory.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Jun 27 18:27:23 2018 +0200

    cloud: Allow Generic driver in configration

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

Author: RadosÅ‚aw Korzeniewski <radekk@inteos.pl>
Date:   Fri Jun 1 09:52:18 2018 +0200

    Add a Collector resource and threads to SD.

Author: Marcin Haba <marcin.haba@bacula.pl>
Date:   Mon Nov 6 14:31:44 2017 +0100

    Remove default value flag from the cloud endpoint directives

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Sep 11 15:45:15 2017 +0200

    cloud: Add callbacks to was_driver

    This allows to cancel processed when possible and report progress.
    cloud driver init() interface is modified to pass usefull block size info.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Aug 28 17:01:53 2017 +0200

    Azure : correct endpoint handling in conf files.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 16:07:47 2017 +0200

    azure: was_driver class and C_WAS_DRIVER enum.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:52:13 2017 +0200

    azure: add some azure-specific resoures to CLOUD

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon May 1 09:39:57 2017 +0200

    dedup: Add directive Storage::DedupCheckHash to control the rehydration control. Default is no.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Oct 31 18:17:19 2016 +0100

    Implement Cloud resource TruncateCache and Synchronize directives (not used yet)

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Sep 28 16:44:27 2016 +0200

    dedup: add MaxContainerSize directive to SD ( FIX #1728 )

    - this directive must limit the size of the container
    - add max_container_size to bacula-sd.conf and to BucketManager
    - new method BucketManager::grow0() like grow() but without any lock
    - new method BucketManager::add_buckets() that add a bucket
    - new method BucketManager::can_grow_more() that tell if a bucket can grow
    - allocate the max size (511 entries) for the container table
      (this is the maximum for standard 64K header)
    - use BucketManager::alloc_block() instead of Bucket::alloc_block() to alloc chunks
      BucketManager::alloc_block() will handle the choice of the bucket, extend or
      create a new one when required.
    - use Bucket::capacity() instead of ba.size
    - dedup: link extra container together and keep ba.size < max_container_bidx
      . container of the same max_blocksize are linked
      . the head is got by BucketManager::choose_bucket()
      . the current container is head->current
      . they can be iterated up to NULL vi head->current->next
      . ba.size is kept < max_container_bidx by grow0()
        (I started doing a "runtime" limitation in alloc_block())
      . brc32 must use the right size (ba.size,max_container_bidx) at startup
      . add_buckets() return a bucket and handle "md_fsmonly"
    - extend clone_fsm() to handle extra containers
    - extend BucketManager::alloc_block() to keep vacuum_fsm geometry in sync
    - add a lock parameter to BucketManager::get_bucket(blockaddr addr, bool lck=true)
    - new method DedupEngine::vacuum_mark0() with a lock parameter
    - can modifying MaxContainerSize at any time
     . containers that are already bigger than the new value will no grow anymore
     . container that are smaller than the new value will continue to grow
    - add bucketmanager::Check

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Sep 1 20:16:25 2016 +0200

    First cut Cloud resource for SD Device

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jul 28 09:57:32 2016 +0200

    Get device name tables setup correctly + some comments

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jul 18 17:40:51 2016 +0200

    Change the default MaximumFileIndex from 50MB to 100MB by default

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Jun 3 15:51:12 2014 +0200

    dedup: handle purge part1

    just rename the "volume" into "volumeXXX.tobepurged"

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu May 8 10:09:13 2014 +0200

    Redefine SD dedup directives

Author: Alain Spineux <alain@baculasystems.com>
Date:   Sun Apr 6 20:05:35 2014 +0200

    Beginning of dedup code

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Dec 10 17:53:22 2011 +0100

    Cleanup compiler warnings

4 years agoBEE Backport bacula/src/stored/stored.h
Kern Sibbald [Tue, 12 May 2020 19:22:29 +0000 (21:22 +0200)] 
BEE Backport bacula/src/stored/stored.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 12:59:43 2020 +0100

    Move dedup functions in separted files

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Nov 28 14:11:54 2017 +0100

    new breaddir() function to replace readdir_r() + core update

    - breaddir() is a thread safe replacement for readdir_r()
    - remove any usage of readdir_r() and readdir() in the core
    - remove NAMELEN() (that was never used except for 3 uses in find_one.c)

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Aug 1 21:19:06 2014 +0200

    Simplify windows includes + implement Windows last changed time on a file

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Jun 7 16:30:59 2014 +0200

    Fix ifdef for SD_DEDUP_SUPPORT

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun May 4 09:05:48 2014 +0200

    First cut adding dedup dev + plugin

4 years agoBEE Backport bacula/src/stored/stored.c
Eric Bollengier [Tue, 12 May 2020 19:22:17 +0000 (21:22 +0200)] 
BEE Backport bacula/src/stored/stored.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 20:16:22 2020 +0200

    Reliably log user activity in a way that satisfies auditors

    Messages {
      name = Standard
      append = /tmp/bacula.log = all

      # To send the events into a log and in the catalog
      append = /tmp/audit.log = events, !events.bweb
      catalog = all, events
    }

    Users can create custom events with a console command:

    .events

    They can list events in the catalog with

    * list events
    +---------------------+------------+-----------+--------------------------------+
    | time                | type       | source    | events                         |
    +---------------------+------------+-----------+--------------------------------+
    | 2020-04-24 17:04:07 | daemon     | *Daemon*  | Director startup               |
    | 2020-04-24 17:04:12 | connection | *Console* | Connection from 127.0.0.1:8101 |
    | 2020-04-24 17:04:20 | command    | *Console* | purge jobid=1                  |
    +---------------------+------------+-----------+--------------------------------+

    The event format in the log is:

    24-Apr 17:04 Events: code=DC0001 from=zog8-dir ref=0x1fa5 type=daemon source=*Daemon* text=Director startup

    24-Apr 17:04 Events: code=DC0002 from=zog8-dir ref=0x7fb58000c4b8 type=connection source=*Console* text=Connection from 127.0.0.1:8101

    The reference (ref) is used to identify a console session, all activity
    from the same console will have the same reference.

    The source is the name of the restricted console, or *Console* if this
    is the default console.

    We have the following events:
     - cancel a job
     - delete volume
     - delete job
     - purge job
     - delete pool
     - delete client
     - daemon startup
     - daemon shutdown
     - console connection
     - console disconnection

    To add a new events:
    ua->send_events(type, format, arguments);

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jan 14 15:09:05 2020 +0100

    Add specific checks when TLS PSK is not available in SSL library

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Oct 30 11:58:32 2019 +0100

    Disable device debug hook only for windows

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 10 11:58:00 2019 +0200

    Fix windows compilation

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:33 2019 +0200

    PSK: Add new "TLS PSK Enable" directive to all resources

    - add the field to the resources
    - create default "psk_ctx" CONTEXT for each of them at startup

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 22 10:50:06 2019 +0100

    cloud: Handle was driver has a generic drv

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 1 17:33:35 2018 +0100

    cloud: Accept empty Hostname, SecretKey and AccessKey for Generic drivers

4 years agoBEE Backport bacula/src/stored/status.c
Eric Bollengier [Tue, 12 May 2020 19:21:54 +0000 (21:21 +0200)] 
BEE Backport bacula/src/stored/status.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 12 21:15:50 2020 +0200

    Move shstore status functions to bee file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon May 4 10:48:14 2020 +0200

    Avoid POOLMEM* in function attributes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Feb 21 11:05:36 2020 +0100

    Fix #5999 about Director connection in status storage output

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 12:59:43 2020 +0100

    Move dedup functions in separted files

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 19 11:24:32 2019 +0200

    Replace few strncpy() with bstrncpy()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 10:38:53 2018 +0100

    cloud: Fix .status devices apiV2 output with device type

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Mar 21 15:10:06 2017 +0100

    add list_resource_limits() to daemon status (part1)

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Dec 22 18:55:51 2016 +0100

    Add information in status command and job output. Manage transfer cancel

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sat Oct 17 09:59:22 2015 +0200

    Use the original match_bsr() code and allow to test new code

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Oct 20 12:19:57 2014 +0200

    dedup: improve cmd "dedup usage" and add "reset" option

    the "reset" option reset the "stats" counters (see line "Stats" below)

    The new output is :
    <<<
    Dedupengine status:
     DDE: hash_count=0 ref_count=0 ref_size=0MB disk_space_used=0MB
        ref_ratio=0.00 size_ratio=0.00 dde_errors=0
     Containers: chunck_allocated=10 chunck_used=0
        disk_space_allocated=0MB disk_space_used=0MB containers_errors=0
     Vacuum: last_run="20-Oct-14 12:14" duration=0s ref_count=0 ref_size=0MB
        vacuum_errors=0
     Stats: read_chunck=0 query_hash=40 new_hash=0 calc_hash=40
    >>>

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jan 28 09:15:23 2014 +0100

    Implement .api v2 and use computer friendly output to status commands.

    For example, we can use the following code:

    static void api_list_dir_status_header(UAContext *ua)
    {
       OutputWriter wt;
       ua->send_msg("%s",
        wt.get_output(
         OT_STRING, "name",        my_name,
         OT_STRING, "version",     VERSION " (" BDATE ")",
         OT_STRING, "uname",       HOST_OS " " DISTNAME " " DISTVER,
         OT_UTIME,  "started",     daemon_start_time,
         OT_UTIME,  "reloaded",    last_reload_time,
         OT_INT,    "jobs_run",    num_jobs_run,
         OT_INT,    "jobs_running",job_count(),
         OT_END
           ));
    }

    It will display

    name=bacula-dir
    version=6.6.3 (12Dec13)
    uname=....

    The OutputWriter class can be configured to use a custom
    separator (\t or \n for example), custom date format, and
    will handle basic formating such as time, string, integer,
    list of strings, etc...

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Oct 26 07:57:10 2013 +0200

    Add SD debug status call

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jan 4 18:52:08 2013 +0100

    Add Demo to the -? output if demo version

    Conflicts:

            bacula/src/dird/dird.c
            bacula/src/tools/dbcheck.c

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Dec 18 12:44:06 2011 +0100

    Start status command to list and clear shared storage

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Dec 12 20:27:38 2011 +0100

    Improved shstore debug and status

4 years agoBEE Backport bacula/src/stored/protos.h
Eric Bollengier [Tue, 12 May 2020 19:21:20 +0000 (21:21 +0200)] 
BEE Backport bacula/src/stored/protos.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 12 21:15:50 2020 +0200

    Move shstore status functions to bee file

4 years agoBEE Backport bacula/src/stored/spool.c
Eric Bollengier [Tue, 12 May 2020 17:24:04 +0000 (19:24 +0200)] 
BEE Backport bacula/src/stored/spool.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 3 13:16:14 2020 +0100

    Move essential piece of FileMedia into bee_libsd_filemedia.c

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 14:54:36 2020 +0100

    Remove BEEF for filemedia

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Jan 30 10:49:29 2019 +0100

    dir: fix minor memory leak in error condition when reading the spool file

    - in read_block_from_spool_file()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Oct 18 10:38:42 2018 +0200

    sir: Fix FileMedia index despooling issue when SpoolData=yes

     With data that has is generating FileMedia (VMware, Exchange) and when SpoolData is enabled
     we can have the following error:

     Error writing header to spool file. Disk probably full. Attempting recovery. Wanted to write=768 got=64

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 17 11:16:02 2016 +0200

    Add BEEF marks for FileMedia feature

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 26 21:41:02 2016 +0200

    Fix spooling code with wrong nbFileMedia variable

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Mar 17 14:30:37 2016 +0100

    dedup: disable data spooling when writing to a dedup device

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Feb 23 13:39:18 2011 +0100

    Use jcr->setJobStatus() in favor of set_jcr_job_status(jcr...)

4 years agoBEE Backport bacula/src/stored/sdcollect.c
Git Backport Process [Tue, 12 May 2020 17:23:41 +0000 (19:23 +0200)] 
BEE Backport bacula/src/stored/sdcollect.c

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/stored/sd_plugins.h
Eric Bollengier [Tue, 12 May 2020 17:21:59 +0000 (19:21 +0200)] 
BEE Backport bacula/src/stored/sd_plugins.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 17 21:26:35 2016 +0100

    Put the cloud driver in a shared object and load it dynamically

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Sep 17 09:22:19 2014 +0200

    Update plugin version to ensure 8.0 will not load 6.6 plugins

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Mar 16 11:35:40 2013 +0100

    Add aligned volume plugin

4 years agoBEE Backport bacula/src/stored/sd_plugins.c
Kern Sibbald [Tue, 12 May 2020 17:21:43 +0000 (19:21 +0200)] 
BEE Backport bacula/src/stored/sd_plugins.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 17 21:26:35 2016 +0100

    Put the cloud driver in a shared object and load it dynamically

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Mar 16 11:35:40 2013 +0100

    Add aligned volume plugin

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Dec 6 21:16:01 2011 +0100

    Add is_plugin_compatible to SD plugins

4 years agoBEE Backport bacula/src/stored/s3_driver.h
Norbert Bizet [Tue, 12 May 2020 17:19:54 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/s3_driver.h

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/stored/s3_driver.c
Norbert Bizet [Tue, 12 May 2020 17:19:41 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/s3_driver.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Oct 3 12:54:52 2019 -0400

    cloud: improve error reporting in S3 driver

    use S3_status_is_retryable to decide if status is retryable.
    beef up the errormsg when status != OK, including curl errors and extra details

    "InternalError" aka Error 500 becomes ErrorInternalError to avoid confusion
    with actual S3 internal error.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Sep 19 05:36:33 2019 -0400

    cloud: adapt S3_driver to the new S3 api

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 16 17:12:34 2017 +0200

    cloud: Fix #2826 about a bug with NextMarker. Speeds bucket listing.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri May 12 17:59:14 2017 +0200

    cloud: Add debug in get_num_cloud_volume_parts_list

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu May 11 19:59:35 2017 +0200

    cloud: About limiting the num part in put_object

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 28 11:17:05 2017 +0200

    MT2767 Fix : Reset error message.

    Usefull to avoid error message when a transfer is OK after a retry.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Feb 6 16:33:32 2017 +0100

    cloud: Simplify s3 messaging.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jan 30 15:30:55 2017 +0100

    Improve cloud proxy probing and use temporary name during transfer

     - Introducing volume_lookup function. Even an empty volume will not be reloaded if it's been already synchronized.

     - Change bacula_ctx struct to class.
     2 constructors from transfer class or POOLMEM ptr.
     errMsg member is a reference to POOLMEM ptr.
     error msg can safely be re-allocated.

     - Debug display transfer when upload error.
    POOLMEM reference modification.

     - Fix s3_driver crash when libs3 is not present.

     - Use transfer message to report drivers errors.

     - #define temp xfer download file name.

     -  copy download parts to tmp xfert file.
    Rename it to part when transfer is completed.

     - Don't truncate uploaded parts.
    Exclude uploaded parts from the cloud proxy list and pass the resulting list to truncate_cloud_volume.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 24 09:36:41 2016 +0100

    Get error message from get_cloud_volume... procedures

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Nov 21 14:50:17 2016 +0100

    Add cloud volumes direct listing.
    Adapt part listing to ilists.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Nov 5 11:54:09 2016 +0100

    Implement isTruncated in older parts of s3_driver.c

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Oct 17 16:18:50 2016 +0200

    Add cancel to cloud device + file and s3 drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 10 14:49:47 2016 +0200

    List cloud content (Volumes and part).
    Shuffled more code around.
    Interface goes like :
      bool get_cloud_volumes_list(alist *volumes);
      bool get_cloud_volume_parts_list(const char *VolumeName, alist *parts);
      bool get_cache_volumes_list(alist *volumes);
      bool get_cache_volume_parts_list(const char *VolumeName, alist *parts);

    Cache part is not complete.
    S3 Cloud needs to be tested.

4 years agoBEE Backport bacula/src/stored/reserve.c
Eric Bollengier [Tue, 12 May 2020 17:19:27 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/reserve.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 19 17:03:29 2018 +0100

    Fix #3395 avoid SD segfault when a device is not initialized correctly

4 years agoBEE Backport bacula/src/stored/record_write.c
Alain Spineux [Tue, 12 May 2020 17:19:16 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/record_write.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 14:54:36 2020 +0100

    Remove BEEF for filemedia

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jun 11 09:00:30 2018 +0200

    aligned: Add support for indexed streams to Aligned Volumes

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 10 14:07:58 2017 +0200

    BIG backport of the devices from Community 9.0

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

4 years agoBEE Backport bacula/src/stored/record_util.c
Alain Spineux [Tue, 12 May 2020 17:19:09 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/record_util.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Aug 4 11:10:03 2015 +0200

    bls: add support for dedup stream

    add a -d to the deduped stream name

4 years agoBEE Backport bacula/src/stored/record_read.c
Eric Bollengier [Tue, 12 May 2020 17:19:02 +0000 (19:19 +0200)] 
BEE Backport bacula/src/stored/record_read.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 19 21:13:24 2018 +0200

    aligned: Fix RecNum count with non standard data packet size

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Mar 28 13:48:00 2018 +0200

    Add prepare bit to the plugin stream and handle it in the SD

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Oct 21 11:43:40 2012 +0200

    Partial refactor record read/write code

4 years agoBEE Backport bacula/src/stored/record.h
Eric Bollengier [Tue, 12 May 2020 17:18:57 +0000 (19:18 +0200)] 
BEE Backport bacula/src/stored/record.h

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Feb 21 13:17:07 2019 +0100

    typo

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 19 21:13:24 2018 +0200

    aligned: Fix RecNum count with non standard data packet size

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Sep 1 16:16:36 2017 +0200

    dedup: Store data rehydrated size in VolABytes media record

    - collect chunk size in rec.extra_byte in append.c
      then sum these size into block->extra_bytes in record_write.c
      and finally do the ccounting into the volume with a
      dev->updateVolCatExtraBytes(block->extra_bytes) in block.c
    - dev->updateVolCatExtraBytes() is a new method that do nothing
      except for dedup_dev object

4 years agoBEE Backport bacula/src/stored/read_records.c
Eric Bollengier [Tue, 12 May 2020 17:18:32 +0000 (19:18 +0200)] 
BEE Backport bacula/src/stored/read_records.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed May 29 15:23:24 2019 +0200

    Fix #5036 debug message about missmatch with BlockNumber tracking

4 years agoBEE Backport bacula/src/stored/read.c
Alain Spineux [Tue, 12 May 2020 17:10:55 +0000 (19:10 +0200)] 
BEE Backport bacula/src/stored/read.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Sep 10 14:53:06 2015 +0200

    Fix MA1151 RT14681 bsock.c:713 Write error sending 24 bytes to Storage ...

    Fix a problem in the flow control termination in copy job.
    One side was still sending FC traffic while the other was not
    listening for them anymore.
    Use the BNET_CMD_STP_FLOWCTRL message that was first used for the FD-SD
    protocol.

4 years agoBEE Backport bacula/src/stored/protos.h
Eric Bollengier [Tue, 12 May 2020 17:10:46 +0000 (19:10 +0200)] 
BEE Backport bacula/src/stored/protos.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 18:47:34 2020 +0100

    Move SIR code to bee files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 3 13:16:14 2020 +0100

    Move essential piece of FileMedia into bee_libsd_filemedia.c

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 14:54:36 2020 +0100

    Remove BEEF for filemedia

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 14:59:09 2020 +0100

    Move reset_bsr to bee_libsd_match_bsr.c

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Dec 3 11:10:47 2019 +0100

    Move new_match_all() to BEE module

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Apr 12 04:55:10 2019 +0200

    PSK: encrypt copy jobs (SD-SD )

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:45 2019 +0200

    PSK: Modify authentication in each daemon to support PSK

    - use AuthenticateBase class

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jun 11 09:00:30 2018 +0200

    aligned: Add support for indexed streams to Aligned Volumes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:27:12 2018 +0100

    Add Quota feature with the Pool:MaximumPoolBytes directive

    The MaximumPoolBytes and the current PoolBytes values are checked
    when creating a new volume or moving a volume from the Scratch Pool.

    The parameter is also sent to the Storage daemon and the Job will control
    before each write that the Quota is not yet reached. If the value is reached,
    the storage daemon will contact the director to know the last known value.

    If the value is reached, then the current volume is marked as Used, and the
    Storage daemon will ask for a new volume.

    Purged and Recycled volumes are counted in the MaximumPoolBytes count. To
    not count these volumes, users can use the RecyclePool option to move the
    Purged/Recycled volumes back to the Scratch pool for example.

    The "llist pool" command lists the maxpoolbytes value and the current poolbytes
    value.

    The current quota can be extended or reduced wiht the reload/update pool commands.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

4 years agoBEE Backport bacula/src/stored/prepare.h
Kern Sibbald [Tue, 12 May 2020 17:07:46 +0000 (19:07 +0200)] 
BEE Backport bacula/src/stored/prepare.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 17 18:33:43 2020 +0200

    Update Bacula Systems Copyright

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 1 09:47:43 2020 +0200

    Fix compilation warning about memset() on prepare_ctx() class

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 14:58:12 2020 +0100

    Move prepare functions to bee_stored_prepare.c

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Feb 5 08:56:02 2019 +0100

    mysql: percona phase2. Pipe xbstream extract and compact on sd-side prepare.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Nov 30 17:26:44 2018 +0100

    mysql: percona phase2. Add xbackup.conf file handling.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Apr 28 20:48:11 2018 +0200

    mysql: Backport percona prepare feature

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 24 11:40:20 2018 +0200

        Cleanup prepare.c

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 24 09:17:50 2018 +0200

        regress: Fix regression tests with prepare=sd

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Fri May 18 15:44:47 2018 +0200

        Fix backport

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 17 16:29:30 2018 +0200

        regress: update mysql prepare scripts

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 17 16:29:02 2018 +0200

        mysql: Do not call innobackupex to recreate the xbstream file

        Calling innobackupex will backup the content of /var/lib/mysql

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 17 15:21:24 2018 +0200

        regress: Add scripts for mysql prepare FD/SD

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 17 15:20:15 2018 +0200

        mysql: Specify --defaults-file in innobackupex command

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Thu May 17 15:18:05 2018 +0200

        mysql: Call xbstream instead of innobackupex in prepare sd

        The innobackupex command tries to backup the current MySQL database
        located in /var/lib/mysql on the storage daemon.

        We need to pack all files into a xbstream file instead.

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Wed May 16 15:41:28 2018 +0200

        mysql: Redirect percona tool output to the log file

    Author: Eric Bollengier <eric@baculasystems.com>
    Date:   Wed May 16 15:40:42 2018 +0200

        regress: add plugin-xtrabackup-bacula-dir.conf.in to do_sed

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Tue May 15 21:24:12 2018 +0200

        Fix prepare=fd so xbstream is clean

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Tue May 15 21:23:51 2018 +0200

        Cleanup mysql-percona-prepare regression test

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Tue May 15 13:25:45 2018 +0200

        Add doc and small tweak to prepare.c

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Mon May 14 08:04:14 2018 +0200

        Tweak mysql-percona regression test

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Mon May 7 09:42:32 2018 +0200

        Add mysql-fd.c

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Sun May 6 17:08:19 2018 +0200

        Cleanup so both percona fd and sd work

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Sun May 6 17:07:33 2018 +0200

        Add percona scripts

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Sun May 6 17:07:04 2018 +0200

        Add Percona test script

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Sun May 6 08:18:53 2018 +0200

        Partial cleanup of logging and error reporting

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Thu May 3 14:48:16 2018 +0200

        SD prepare now working ...

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Wed May 2 12:05:39 2018 +0200

        Add missing script xtrabackup bacula.dir.conf.in file

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Wed May 2 09:24:47 2018 +0200

        SD prepare script working ...

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Tue May 1 18:16:15 2018 +0200

        SD prepare script now ready to run -- still must resend files to Volume

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Mon Apr 30 17:48:34 2018 +0200

        Almost ready to do prepare in SD

    Author: Kern Sibbald <kern@sibbald.com>
    Date:   Sat Apr 28 20:48:11 2018 +0200

        Update Percona prepare on SD -- now creating files

4 years agoBEE Backport bacula/src/stored/org_stored_prepare.c
Eric Bollengier [Tue, 12 May 2020 17:07:39 +0000 (19:07 +0200)] 
BEE Backport bacula/src/stored/org_stored_prepare.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 19:28:35 2020 +0100

    Fix community build

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 16:25:13 2020 +0100

    Move MaxPoolBytes checks in bee files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 14:58:12 2020 +0100

    Move prepare functions to bee_stored_prepare.c

4 years agoBEE Backport bacula/src/stored/org_stored_dedup.c
Eric Bollengier [Tue, 12 May 2020 17:07:37 +0000 (19:07 +0200)] 
BEE Backport bacula/src/stored/org_stored_dedup.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 17 12:59:43 2020 +0100

    Move dedup functions in separted files

4 years agoBEE Backport bacula/src/stored/org_libsd_sir.c
Eric Bollengier [Tue, 12 May 2020 17:07:32 +0000 (19:07 +0200)] 
BEE Backport bacula/src/stored/org_libsd_sir.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 18:47:34 2020 +0100

    Move SIR code to bee files

4 years agoBEE Backport bacula/src/stored/org_libsd_quota.c
Eric Bollengier [Tue, 12 May 2020 17:07:23 +0000 (19:07 +0200)] 
BEE Backport bacula/src/stored/org_libsd_quota.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 16:25:13 2020 +0100

    Move MaxPoolBytes checks in bee files

4 years agoBEE Backport bacula/src/stored/org_libsd_filemedia.c
Eric Bollengier [Tue, 12 May 2020 17:04:32 +0000 (19:04 +0200)] 
BEE Backport bacula/src/stored/org_libsd_filemedia.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 3 13:16:14 2020 +0100

    Move essential piece of FileMedia into bee_libsd_filemedia.c

4 years agoBEE Backport bacula/src/stored/null_dev.c
Kern Sibbald [Tue, 12 May 2020 17:04:14 +0000 (19:04 +0200)] 
BEE Backport bacula/src/stored/null_dev.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

4 years agoBEE Backport bacula/src/stored/mount.c
Eric Bollengier [Tue, 12 May 2020 17:04:09 +0000 (19:04 +0200)] 
BEE Backport bacula/src/stored/mount.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 21 10:21:21 2019 +0100

    Ensure that a job message is printed after some unespected close() errors

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Dec 4 16:34:59 2014 +0100

    Mark file volumes that are not accessible in Error in mount_next_vol

4 years agoBEE Backport bacula/src/stored/match_bsr.c
Alain Spineux [Tue, 12 May 2020 17:04:04 +0000 (19:04 +0200)] 
BEE Backport bacula/src/stored/match_bsr.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Dec 3 11:10:47 2019 +0100

    Move new_match_all() to BEE module

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu May 16 11:36:56 2019 +0200

    Fix #5041 about the Copy of an Incomplete job failing with the error XXX digest not same FileIndex=YYYY

    - An "incomplete" job keeps the same SessTime despite a restart of the SD.
      this make SessTime not always increasing inside a volume.
    - The BSR match function was relaying on the fact that the SessTime
      was always increasing, it should have not anymore, when we have added
      "incomplete" job
    - Their is no reason anymore to STOP a BSR on a sesstime condition,
      we can remove this part of the code.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jan 29 10:18:55 2019 +0100

    Enhance large copy/migration/restore performance with new BSR algorithm

4 years agoBEE Backport bacula/src/stored/lock.c
Eric Bollengier [Tue, 12 May 2020 17:03:13 +0000 (19:03 +0200)] 
BEE Backport bacula/src/stored/lock.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Mar 12 14:23:50 2018 +0100

    Cleanup stored/lock.c using bthread_get_thread_id() rather than #ifdef/#endif

4 years agoBEE Backport bacula/src/stored/label.c
Kern Sibbald [Tue, 12 May 2020 17:02:24 +0000 (19:02 +0200)] 
BEE Backport bacula/src/stored/label.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Mar 27 14:39:45 2017 +0200

    Corrected the label type detection code

Signed-off-by: Eric Bollengier <eric@baculasystems.com>
Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Jul 26 12:54:42 2016 +0200

    First cut Cloud volume label

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 23 20:23:38 2016 +0200

    Small step to full SD classes make some label.c subroutines DEVICE methods

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun May 18 19:03:51 2014 +0200

    Add dedup block size and setup Volume header for dedup

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed May 14 16:21:30 2014 +0200

    First phase new Dedup Volume header

Author: Alain Spineux <alain@baculasystems.com>
Date:   Sun Apr 6 20:05:35 2014 +0200

    Beginning of dedup code

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Oct 30 20:28:34 2013 +0100

    Ensure that aligned and non-aligned Volumes cannot be mixed

4 years agoBEE Backport bacula/src/stored/job.c
Eric Bollengier [Tue, 12 May 2020 17:02:16 +0000 (19:02 +0200)] 
BEE Backport bacula/src/stored/job.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 20:16:22 2020 +0200

    Reliably log user activity in a way that satisfies auditors

    Messages {
      name = Standard
      append = /tmp/bacula.log = all

      # To send the events into a log and in the catalog
      append = /tmp/audit.log = events, !events.bweb
      catalog = all, events
    }

    Users can create custom events with a console command:

    .events

    They can list events in the catalog with

    * list events
    +---------------------+------------+-----------+--------------------------------+
    | time                | type       | source    | events                         |
    +---------------------+------------+-----------+--------------------------------+
    | 2020-04-24 17:04:07 | daemon     | *Daemon*  | Director startup               |
    | 2020-04-24 17:04:12 | connection | *Console* | Connection from 127.0.0.1:8101 |
    | 2020-04-24 17:04:20 | command    | *Console* | purge jobid=1                  |
    +---------------------+------------+-----------+--------------------------------+

    The event format in the log is:

    24-Apr 17:04 Events: code=DC0001 from=zog8-dir ref=0x1fa5 type=daemon source=*Daemon* text=Director startup

    24-Apr 17:04 Events: code=DC0002 from=zog8-dir ref=0x7fb58000c4b8 type=connection source=*Console* text=Connection from 127.0.0.1:8101

    The reference (ref) is used to identify a console session, all activity
    from the same console will have the same reference.

    The source is the name of the restricted console, or *Console* if this
    is the default console.

    We have the following events:
     - cancel a job
     - delete volume
     - delete job
     - purge job
     - delete pool
     - delete client
     - daemon startup
     - daemon shutdown
     - console connection
     - console disconnection

    To add a new events:
    ua->send_events(type, format, arguments);

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Aug 6 13:51:29 2018 +0200

    Add M_SECURITY when connection is bad + fix bug where invalid probes sent to Dir

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 28 17:01:40 2017 +0200

    Write the list of selected files to a temporary file if requested by a Plugin

    If we find a RestoreObject with the type FT_PLUGIN_FILELIST, we list all
    selected files in a temporary file to send it to the FD before the actual
    restore as a RestoreObject.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 17 11:16:02 2016 +0200

    Add BEEF marks for FileMedia feature

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Feb 1 23:16:04 2014 +0100

    Implement SD-SD migrate/copy code

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Jul 20 18:55:54 2013 +0200

    Fix seg fault bug 7901 bsock released during cancel

4 years agoBEE Backport bacula/src/stored/init_dev.c
Kern Sibbald [Tue, 12 May 2020 17:01:52 +0000 (19:01 +0200)] 
BEE Backport bacula/src/stored/init_dev.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 10 14:07:58 2017 +0200

    BIG backport of the devices from Community 9.0

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 20 11:49:01 2017 +0100

    Implement loable shared object for aligned volumes and dedup volumes

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Oct 14 09:36:15 2016 +0200

    Eliminate vestiges of the DVD device

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Jun 21 11:07:09 2016 +0200

    More work on separating dedup and aligned into loadable SD drivers

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

4 years agoBEE Backport bacula/src/stored/hello.c
Kern Sibbald [Tue, 12 May 2020 17:01:39 +0000 (19:01 +0200)] 
BEE Backport bacula/src/stored/hello.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Apr 12 04:55:10 2019 +0200

    PSK: encrypt copy jobs (SD-SD )

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 18:25:24 2019 +0200

    PSK: cleanup authentication and replace sscanf with scan_string()

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:45 2019 +0200

    PSK: Modify authentication in each daemon to support PSK

    - use AuthenticateBase class

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 27 11:04:51 2018 +0200

    Fix #3769 about compatibility issue with Bacula FD 7.4 and 9.0

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jun 16 16:56:19 2016 +0200

    Fix compatibility with the community File Daemon 7.2 and 7.4

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 12 10:01:54 2015 +0100

    Ensure that only one thread can use the auth code in the Storage

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Feb 17 15:49:10 2015 +0100

    dedup: SD-SD avoid rehydration

    this patch don't do dedup, just skip rehydration
    Be carefull of the "3000 OK data" message change
    The end of the rehydration is announced by the
    last ACK after the EOD

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Aug 28 05:16:54 2014 +0200

    update SD <-> SD capabilities exchange

    I forgot to update adjust the recv when I changed the send

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Aug 26 15:45:58 2014 +0200

    Use unsigned int for dedup block size

    Should fix compilation warning and is aligned with what
    we have in dev.h

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Aug 25 16:26:05 2014 +0200

    dedup: use and extend SD capabilities

    - initialize jcr->sd_hash_size using jcr->sh_hash
    - added jcr->max_dedup_block_size, block above this size must be send
    in raw format to avoid DDE overflowing.
    DDE cannot handle block above this size.
    NOTICE raw format is not yet implemented in DEDUP 8.0
    - added min_blocksize to DedupEngine
    - in filed/job.c, moved creation of jcr->dedup after the capabilities
    exchanges to be able to use them in DedupFiledInterface
    - in append.c and backup.c, dedup file if size >= min_block_size

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Aug 21 15:48:30 2014 +0200

    Fix bad caps with SDcallsClient + debug + fix seg fault on connection error

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Jul 22 15:35:28 2014 +0200

    Finish SD-FD caps coding

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Jul 22 20:31:05 2014 +0200

    Set dedup by device in SD caps if possible

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Jun 23 20:18:01 2014 +0200

    Implement new capabilities comm protocol -- variables passed not yet used

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Jun 22 15:07:17 2014 +0200

    Add new FD hello.c + create capability subroutines

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jun 20 21:32:36 2014 +0200

    Refactor the SD Hello code to put it all in hello.c

4 years agoBEE Backport bacula/src/stored/generic_driver.h
Norbert Bizet [Tue, 12 May 2020 17:00:43 +0000 (19:00 +0200)] 
BEE Backport bacula/src/stored/generic_driver.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 27 10:19:59 2019 -0400

    cloud: Start drivers and log into the working directory

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jun 24 07:52:56 2019 -0400

    cloud: mv debug level to 50 and add a DT_CLOUD tag

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 6 07:40:19 2019 -0400

    cloud: Forward bandwidth limit to generic driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 14 05:46:36 2019 -0400

    cloud: Fix #3914 unset LC_TIME when using was driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 22 10:53:57 2019 +0100

    cloud: allow use of file path for was drv

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Mar 12 09:25:35 2019 +0100

    cloud: generic drive sets azure params

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 28 10:40:15 2019 +0100

    Update copyright year

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 28 13:10:07 2018 +0200

    cloud: forward Bacula cloud directives to cloud drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Sat Aug 4 11:50:12 2018 +0200

    cloud: Forward host name. Used as cache path in generic_cloud_driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 13 10:11:37 2018 +0200

    cloud: Take script return value in account. Handle new bpipe "e" mode

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 6 11:59:02 2018 +0200

    cloud: allow throttling and  fix some code issues with generic driver

    Take some Eric's remarks in account.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Jul 4 11:03:41 2018 +0200

    cloud: introduce Google cloud implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jul 2 11:58:47 2018 +0200

    cloud: implement async I/O with generic driver scripts

    stdin and stdout are used for piped IPC with the script. call_fct is the function that handles file descriptors.
    Specific callback are passed for each function.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

4 years agoBEE Backport bacula/src/stored/fifo_dev.c
Kern Sibbald [Tue, 12 May 2020 17:00:22 +0000 (19:00 +0200)] 
BEE Backport bacula/src/stored/fifo_dev.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

4 years agoBEE Backport bacula/src/stored/autochanger.c
Kern Sibbald [Tue, 12 May 2020 16:57:39 +0000 (18:57 +0200)] 
BEE Backport bacula/src/stored/autochanger.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jan 19 14:01:30 2012 +0100

    Start adding BEEF, pull files from Branch-5.2

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Nov 23 11:32:27 2011 +0100

    Add new SD plugin code + shared storage plugin

4 years agoBEE Backport bacula/src/stored/generic_driver.c
Norbert Bizet [Tue, 12 May 2020 16:51:34 +0000 (18:51 +0200)] 
BEE Backport bacula/src/stored/generic_driver.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Feb 21 07:12:13 2020 -0500

    cloud: Fix #5992 remove timeout during part transfer

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Dec 13 10:30:17 2019 -0500

    cloud: Fix #5782 Memory allocation issue and download return code

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Dec 16 04:21:33 2019 -0500

    isolate glacier function in a separated dso

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:34:25 2019 -0400

    cloud: fixme typos + define timeout limits

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Oct 1 03:52:42 2019 -0400

    cloud: update version/cleanup messaging for testing

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Jul 2 12:51:49 2019 -0400

    generic cloud: rework upload retry loop.

    delete target for each retry (cleanup)
    Make sure 3 retries are done.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 27 10:19:59 2019 -0400

    cloud: Start drivers and log into the working directory

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 27 06:21:10 2019 -0400

    cloud: improve close_bpipe messaging.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 27 05:42:33 2019 -0400

    cloud: handle close_bpipe code.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jun 24 07:52:56 2019 -0400

    cloud: mv debug level to 50 and add a DT_CLOUD tag

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jun 21 05:59:11 2019 -0400

    cloud: update generic drivers.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 6 09:46:52 2019 -0400

    cloud: Apply multi-part select to get_cloud_volumes_list

    Same as get_cloud_volume_parts_list

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 6 07:40:19 2019 -0400

    cloud: Forward bandwidth limit to generic driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 6 03:47:34 2019 -0400

    cloud: Introduce a was_driver_simulator

    Use FakeAzureCloud cloud device in config (see cloud.conf.sample)

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed May 22 10:40:13 2019 -0400

    cloud: Make SHA512 work with HAVE_OPENSSL undef

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 21 08:13:57 2019 -0400

    cloud: Repeat upload on error with AWS, Oracle, Google, Swift drivers

    Also make sure the processed size is incremented during transfer.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 14 05:46:36 2019 -0400

    cloud: Fix #3914 unset LC_TIME when using was driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 22 10:53:57 2019 +0100

    cloud: allow use of file path for was drv

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Mar 12 09:25:35 2019 +0100

    cloud: generic drive sets azure params

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 21 10:21:21 2019 +0100

    Ensure that a job message is printed after some unespected close() errors

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jan 10 19:00:23 2019 +0100

    cloud: Get information about the cloud driver command at with high debug

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 28 10:40:15 2019 +0100

    Update copyright year

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 11 15:06:17 2019 +0100

    cloud: Fix volume list output in bcloud

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 09:37:52 2018 +0100

    cloud: Remove extra empty line in job output

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 1 17:33:35 2018 +0100

    cloud: Accept empty Hostname, SecretKey and AccessKey for Generic drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 28 13:43:33 2018 +0200

    cloud: display used cloud driver in dev print_type()

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 28 13:10:07 2018 +0200

    cloud: forward Bacula cloud directives to cloud drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Sep 6 09:42:50 2018 +0200

    cloud: define BaculaCloudDriver external factory method for each cloud driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Sat Aug 4 14:12:00 2018 +0200

    cloud: Replace fwrite and fread with read and full_write

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Sat Aug 4 11:50:12 2018 +0200

    cloud: Forward host name. Used as cache path in generic_cloud_driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jul 26 10:28:15 2018 +0200

    cloud: clean up cloud driver locations

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 20 10:25:41 2018 +0200

    cloud: Add support for Oracle cloud

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 13 10:11:37 2018 +0200

    cloud: Take script return value in account. Handle new bpipe "e" mode

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 6 11:59:02 2018 +0200

    cloud: allow throttling and  fix some code issues with generic driver

    Take some Eric's remarks in account.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Jul 4 11:03:41 2018 +0200

    cloud: introduce Google cloud implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jul 2 11:58:47 2018 +0200

    cloud: implement async I/O with generic driver scripts

    stdin and stdout are used for piped IPC with the script. call_fct is the function that handles file descriptors.
    Specific callback are passed for each function.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

4 years agoBEE Backport bacula/src/stored/file_driver.h
Norbert Bizet [Tue, 12 May 2020 16:51:26 +0000 (18:51 +0200)] 
BEE Backport bacula/src/stored/file_driver.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Dec 16 04:21:33 2019 -0500

    isolate glacier function in a separated dso

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Oct 1 03:50:49 2019 -0400

    cloud: upgrade file_driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 15 15:38:09 2017 +0100

    cloud: Don't propagate part_size to cloud driver init.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Sep 24 13:51:57 2016 +0200

    First cut Cloud file driver

4 years agoBEE Backport bacula/src/stored/file_driver.c
Norbert Bizet [Tue, 12 May 2020 16:50:37 +0000 (18:50 +0200)] 
BEE Backport bacula/src/stored/file_driver.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 5 15:24:53 2020 +0200

    cloud: Enhance the put_object procedure for file driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Dec 16 04:21:33 2019 -0500

    isolate glacier function in a separated dso

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Oct 1 03:50:49 2019 -0400

    cloud: upgrade file_driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jun 24 07:52:56 2019 -0400

    cloud: mv debug level to 50 and add a DT_CLOUD tag

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 09:37:52 2018 +0100

    cloud: Remove extra empty line in job output

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 1 17:33:35 2018 +0100

    cloud: Accept empty Hostname, SecretKey and AccessKey for Generic drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Jan 30 10:43:28 2018 +0100

    replace readdir_r with breaddir.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 15 15:38:09 2017 +0100

    cloud: Don't propagate part_size to cloud driver init.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 20 09:40:57 2017 +0100

    Replace POOLMEM ** with POOLMEM *& in cloud files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Dec 13 11:01:49 2016 +0100

    In the file_driver, if opendir() fails with ENOENT, the volume does not exist in the cloud

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 24 09:36:41 2016 +0100

    Get error message from get_cloud_volume... procedures

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Nov 11 14:02:14 2016 +0100

    Fix s3_driver get_cloud_sizes + use VolumeName from argument to get_xx_sizes

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Oct 17 16:18:50 2016 +0200

    Add cancel to cloud device + file and s3 drivers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 12 09:42:24 2016 +0200

    Cache cloud enum part. Simplified
    After yesterday discussion with @eric, it comes out that we don't need to list all volumes on the cache and/or cloud. This simplifies the api and the s3 driver request. This has been briefly tested on s3 and file driver.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 10 14:49:47 2016 +0200

    List cloud content (Volumes and part).
    Shuffled more code around.
    Interface goes like :
      bool get_cloud_volumes_list(alist *volumes);
      bool get_cloud_volume_parts_list(const char *VolumeName, alist *parts);
      bool get_cache_volumes_list(alist *volumes);
      bool get_cache_volume_parts_list(const char *VolumeName, alist *parts);

    Cache part is not complete.
    S3 Cloud needs to be tested.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 7 16:42:57 2016 +0200

    modifying interface. Volume arg. list pointer.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 7 15:00:12 2016 +0200

    implement get_volume_parts_list for cloud_devices
    not tested yet

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Sep 25 14:13:50 2016 +0200

    Implement file_driver copy to cloud + get_cloud_sizes

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Sep 24 13:51:57 2016 +0200

    First cut Cloud file driver

4 years agoBEE Backport bacula/src/stored/fd_cmds.c
Eric Bollengier [Tue, 12 May 2020 16:50:11 +0000 (18:50 +0200)] 
BEE Backport bacula/src/stored/fd_cmds.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 20:16:22 2020 +0200

    Reliably log user activity in a way that satisfies auditors

    Messages {
      name = Standard
      append = /tmp/bacula.log = all

      # To send the events into a log and in the catalog
      append = /tmp/audit.log = events, !events.bweb
      catalog = all, events
    }

    Users can create custom events with a console command:

    .events

    They can list events in the catalog with

    * list events
    +---------------------+------------+-----------+--------------------------------+
    | time                | type       | source    | events                         |
    +---------------------+------------+-----------+--------------------------------+
    | 2020-04-24 17:04:07 | daemon     | *Daemon*  | Director startup               |
    | 2020-04-24 17:04:12 | connection | *Console* | Connection from 127.0.0.1:8101 |
    | 2020-04-24 17:04:20 | command    | *Console* | purge jobid=1                  |
    +---------------------+------------+-----------+--------------------------------+

    The event format in the log is:

    24-Apr 17:04 Events: code=DC0001 from=zog8-dir ref=0x1fa5 type=daemon source=*Daemon* text=Director startup

    24-Apr 17:04 Events: code=DC0002 from=zog8-dir ref=0x7fb58000c4b8 type=connection source=*Console* text=Connection from 127.0.0.1:8101

    The reference (ref) is used to identify a console session, all activity
    from the same console will have the same reference.

    The source is the name of the restricted console, or *Console* if this
    is the default console.

    We have the following events:
     - cancel a job
     - delete volume
     - delete job
     - purge job
     - delete pool
     - delete client
     - daemon startup
     - daemon shutdown
     - console connection
     - console disconnection

    To add a new events:
    ua->send_events(type, format, arguments);

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jul 11 16:57:45 2019 +0200

    Rework SD/FD test network function

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jul 8 18:19:00 2019 +0200

    Add RTT estimation to the 'status network' command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Aug 17 10:35:11 2016 +0200

    Add "status network" command to test the connection and the bandwidth between a Client and a Storage Daemon

4 years agoBEE Backport bacula/src/stored/dircmd.c
Eric Bollengier [Tue, 12 May 2020 16:50:04 +0000 (18:50 +0200)] 
BEE Backport bacula/src/stored/dircmd.c

This commit is the result of the squash of the following main commits:

Author: Marcin Haba <marcin.haba@bacula.pl>
Date:   Thu Mar 19 10:05:32 2020 +0100

    Fix #6085 voltype setting when tape volume is labeled

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Feb 21 11:05:36 2020 +0100

    Fix #5999 about Director connection in status storage output

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Dec 3 11:10:47 2019 +0100

    Move new_match_all() to BEE module

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Dec 2 16:09:07 2019 +0100

    Fix compilation with COMMUNITY

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 12:13:46 2019 -0500

    cloud: Fix #5537 if dev errmsg exists, display it otherwise use jcr errmsg

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 10:32:29 2019 -0500

    cloud: Enhance cache truncate command output

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 09:28:39 2019 -0500

    cloud: Fix #5536 make sure truncate_cache as cloud proxy up-to-date

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Apr 12 04:55:10 2019 +0200

    PSK: encrypt copy jobs (SD-SD )

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:45 2019 +0200

    PSK: Modify authentication in each daemon to support PSK

    - use AuthenticateBase class

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 21 10:21:21 2019 +0100

    Ensure that a job message is printed after some unespected close() errors

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 31 16:11:41 2017 +0100

    add a jcr->set_killable(true) to the SD and FD

    - under a "#ifdef DEVELOPER" to start

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 28 17:01:40 2017 +0200

    Write the list of selected files to a temporary file if requested by a Plugin

    If we find a RestoreObject with the type FT_PLUGIN_FILELIST, we list all
    selected files in a temporary file to send it to the FD before the actual
    restore as a RestoreObject.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun May 21 17:22:58 2017 +0200

    Fix race in steal_device_lock shown in truncate-concurrent-test

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Oct 21 13:27:07 2016 +0200

    Implement truncate cache command

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Dec 11 09:51:53 2015 +0100

    Fix truncate race bug #1382

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Feb 24 17:16:21 2014 +0100

    Implement sd_calls_client for Migrate/Copy jobs

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Feb 1 23:16:04 2014 +0100

    Implement SD-SD migrate/copy code

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Jan 4 17:30:07 2014 +0100

    Implement SD Calls Client

    which is a prerequesite for SD->SD

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue May 8 18:51:01 2012 +0200

    Always set autochanger even for Storage devices + ensure shared storage unlocked on error exit

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Jan 28 20:49:50 2012 +0100

    Fix (hopefully) shstore locking in dircmd.c of SD

4 years agoBEE Backport bacula/src/stored/dev.h
Eric Bollengier [Tue, 12 May 2020 16:48:40 +0000 (18:48 +0200)] 
BEE Backport bacula/src/stored/dev.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 09:28:39 2019 -0500

    cloud: Fix #5536 make sure truncate_cache as cloud proxy up-to-date

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 25 17:58:55 2019 +0100

    Add device device_specific_close() function to fix open_device() code

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 10:38:53 2018 +0100

    cloud: Fix .status devices apiV2 output with device type

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 19 21:13:24 2018 +0200

    aligned: Fix RecNum count with non standard data packet size

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 14 10:41:10 2018 +0100

    Adjust WrittenBytes for aligned devices

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Jul 27 17:33:18 2016 +0200

    Make Cloud device work with one chunk

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 17 12:34:08 2016 +0200

    Use 64bit integer for new DEVICE variable max_index_size

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon May 2 09:29:57 2016 +0200

    Add an option to configure the FileMedia record interval

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 23 10:05:32 2016 +0100

    Fix #1674 About Solaris Intel SD checksum errors

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Aug 14 14:59:27 2015 +0200

    Add code to handle interactive restore session in Storage Daemon

     - Store the File/Block/Recnum/Volume position at the record level
     - Modify the read_record() loop to reposition the volume when
       dev::set_interactive_reposition() is called
     - Allow to reposition to a specific BSR (may be created just for the call)

4 years agoBEE Backport bacula/src/stored/dev.c
Eric Bollengier [Tue, 12 May 2020 16:47:51 +0000 (18:47 +0200)] 
BEE Backport bacula/src/stored/dev.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 25 17:58:55 2019 +0100

    Add device device_specific_close() function to fix open_device() code

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 10 14:07:58 2017 +0200

    BIG backport of the devices from Community 9.0

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jun 17 18:31:23 2016 +0200

    First cut cloud + aligned loadable drivers

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jun 8 17:51:54 2012 +0200

    Rewrite some SD subroutines as class members

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Feb 8 18:56:00 2012 +0100

    Clear slot on free only for SAN shared storage

4 years agoBEE Backport bacula/src/stored/dedupstored.h
Alain Spineux [Tue, 12 May 2020 16:46:58 +0000 (18:46 +0200)] 
BEE Backport bacula/src/stored/dedupstored.h

4 years agoBEE Backport bacula/src/stored/dedup_interface.h
Alain Spineux [Tue, 12 May 2020 16:46:20 +0000 (18:46 +0200)] 
BEE Backport bacula/src/stored/dedup_interface.h

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Sep 24 10:17:51 2019 +0200

    dedup: move all dedup code into the plugin

    - remove global variables: dedupengine and bucker_manager
    - update protocol SD<->DIR
    - extend dedup_dev and BufferedMsgSD to suuport all function
    - create "dummy" functions in dev.h
    Warning :
    - include a dedupengine use counter
    - .status storage=XXX dedupengine display all the dedupengine on the SD
     instead of the one(s) related to the "device"

4 years agoBEE Backport bacula/src/stored/dedup_dev.h
Alain Spineux [Tue, 12 May 2020 16:45:38 +0000 (18:45 +0200)] 
BEE Backport bacula/src/stored/dedup_dev.h

4 years agoBEE Backport bacula/src/stored/cloud_transfer_mgr.h
Norbert Bizet [Tue, 12 May 2020 16:44:37 +0000 (18:44 +0200)] 
BEE Backport bacula/src/stored/cloud_transfer_mgr.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 16 03:59:28 2019 -0400

    cloud: distinguish queued for waiting transfers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Sep 30 17:36:33 2019 +0200

    cloud: Do 10 retries for S3 after an InternalError

    The InternalError state is not very well defined on libS3
    a HTTP 500 Amazon error will end up as an InternalError.

    So, Internal is not always Internal.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Sep 11 15:45:15 2017 +0200

    cloud: Add callbacks to was_driver

    This allows to cancel processed when possible and report progress.
    cloud driver init() interface is modified to pass usefull block size info.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 14 16:12:48 2017 +0200

    reset processed_size for use in s3 driver retry.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed May 17 19:25:00 2017 +0200

    cloud: Improve statistics calculation in download/upload manager

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Dec 16 16:39:09 2016 +0100

    item 81: encapsulate transfer related  functions.

    transfer-related functions are attached to the transfer object.
    transfer_mgr is used as a facade to encapsulate ref counting and mutex locking.
    cloud_dev is adapted to the new interfaces.
    dev.h : 2 lists to separate downloads from uploads.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Nov 25 15:57:33 2016 +0100

    comment typo + add a transfer alist to mgr.
    The list is m_transfer_list.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Nov 11 16:32:39 2016 +0100

    merge norbert's changes back in kern-cloud2.
    Took Eric's code review in account.
    s3_driver -> callback parameters are passed via bacula_ctx.
    Transfer is done synchronously.
    Can be made async by defining ASYNC_TRANSFER.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 9 11:26:54 2016 +0100

    Add cloud tranfert manager source file

4 years agoBEE Backport bacula/src/stored/cloud_transfer_mgr.c
Norbert Bizet [Tue, 12 May 2020 16:44:31 +0000 (18:44 +0200)] 
BEE Backport bacula/src/stored/cloud_transfer_mgr.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Oct 17 03:54:52 2019 -0400

    cloud: complete api2 status report for glacier

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 16 03:59:28 2019 -0400

    cloud: distinguish queued for waiting transfers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Sep 30 17:36:33 2019 +0200

    cloud: Do 10 retries for S3 after an InternalError

    The InternalError state is not very well defined on libS3
    a HTTP 500 Amazon error will end up as an InternalError.

    So, Internal is not always Internal.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jun 24 07:52:56 2019 -0400

    cloud: mv debug level to 50 and add a DT_CLOUD tag

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed May 22 09:57:09 2019 -0400

    cloud: Fix #5060 Strengthen append_api_status

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Sep 11 15:45:15 2017 +0200

    cloud: Add callbacks to was_driver

    This allows to cancel processed when possible and report progress.
    cloud driver init() interface is modified to pass usefull block size info.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Jul 14 16:12:48 2017 +0200

    reset processed_size for use in s3 driver retry.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jul 10 18:29:01 2017 +0200

    cloud: Fix #2989 about a double delete in transfer_mgr stats.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 30 18:24:10 2017 +0200

    cloud: purge done xfer when is called update_statistics.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed May 17 19:25:00 2017 +0200

    cloud: Improve statistics calculation in download/upload manager

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Apr 27 16:07:40 2017 +0200

    Add debug level to the transfer code.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Dec 22 18:55:51 2016 +0100

    Add information in status command and job output. Manage transfer cancel

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Dec 16 16:39:09 2016 +0100

    item 81: encapsulate transfer related  functions.

    transfer-related functions are attached to the transfer object.
    transfer_mgr is used as a facade to encapsulate ref counting and mutex locking.
    cloud_dev is adapted to the new interfaces.
    dev.h : 2 lists to separate downloads from uploads.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Dec 2 15:03:26 2016 +0100

    Use brute force to eliminate double free in transfer manager

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Nov 11 16:32:39 2016 +0100

    merge norbert's changes back in kern-cloud2.
    Took Eric's code review in account.
    s3_driver -> callback parameters are passed via bacula_ctx.
    Transfer is done synchronously.
    Can be made async by defining ASYNC_TRANSFER.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 9 11:26:54 2016 +0100

    Add cloud tranfert manager source file

4 years agoBEE Backport bacula/src/stored/cloud_parts.h
Norbert Bizet [Tue, 12 May 2020 16:44:09 +0000 (18:44 +0200)] 
BEE Backport bacula/src/stored/cloud_parts.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 12 10:53:12 2016 +0200

    Move parts comparison procedures within cloud_parts

    comparison are dummy unit tested.

4 years agoBEE Backport bacula/src/stored/cloud_parts.c
Norbert Bizet [Tue, 12 May 2020 16:44:04 +0000 (18:44 +0200)] 
BEE Backport bacula/src/stored/cloud_parts.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 12 10:53:12 2016 +0200

    Move parts comparison procedures within cloud_parts

    comparison are dummy unit tested.

4 years agoBEE Backport bacula/src/stored/cloud_glacier.h
Norbert Bizet [Tue, 12 May 2020 16:43:40 +0000 (18:43 +0200)] 
BEE Backport bacula/src/stored/cloud_glacier.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

4 years agoBEE Backport bacula/src/stored/cloud_driver.h
Norbert Bizet [Tue, 12 May 2020 16:43:20 +0000 (18:43 +0200)] 
BEE Backport bacula/src/stored/cloud_driver.h

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/stored/cloud_dev.h
Norbert Bizet [Tue, 12 May 2020 16:42:35 +0000 (18:42 +0200)] 
BEE Backport bacula/src/stored/cloud_dev.h

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 09:28:39 2019 -0500

    cloud: Fix #5536 make sure truncate_cache as cloud proxy up-to-date

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Sun Jan 6 20:45:39 2019 -0200

    cloud: added Swift Cloud Plugin

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 10:38:53 2018 +0100

    cloud: Fix .status devices apiV2 output with device type

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 28 13:43:33 2018 +0200

    cloud: display used cloud driver in dev print_type()

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Sep 6 09:41:48 2018 +0200

    cloud: relocate cloud driver types

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

4 years agoBEE Backport bacula/src/stored/cloud_dev.c
Norbert Bizet [Tue, 12 May 2020 16:42:27 +0000 (18:42 +0200)] 
BEE Backport bacula/src/stored/cloud_dev.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed May 6 10:39:29 2020 -0400

    cloud: Fix part_size on open_device (part.2 size = 0)

    The part_size variable was not always set when opening a new part file.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue May 5 10:51:40 2020 -0400

    cloud: Make sure only a DONE transfer will ever be truncated

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri May 1 12:47:06 2020 -0400

    cloud: Add debug to open_next_part

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Apr 29 09:55:20 2020 -0400

    cloud: Always wait for part download

    If the part size is 0 (can happen with previous backups), we
    must also ensure that any download is finished before to try
    to open the part file.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 09:28:39 2019 -0500

    cloud: Fix #5536 make sure truncate_cache as cloud proxy up-to-date

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Nov 6 10:32:29 2019 -0500

    cloud: Enhance cache truncate command output

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Oct 24 09:04:54 2019 -0400

    cloud: Fix #5532 more errmsg output on cloud_dev open_device

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Oct 16 03:59:28 2019 -0400

    cloud: distinguish queued for waiting transfers

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:34:25 2019 -0400

    cloud: fixme typos + define timeout limits

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Oct 14 05:35:57 2019 -0400

    cloud: handle restore params in Cloud res

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Oct 11 11:34:41 2019 -0400

    cloud: implement S3 cloud glacier support

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Oct 1 03:52:42 2019 -0400

    cloud: update version/cleanup messaging for testing

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 20 08:56:28 2019 -0400

    cloud: Do not overwrite an existing part in the cloud

    cloud: s3 copy when part exists in cloud. cleanup on truncate.

    cloud: move part versionning to cloud_dev.

    make sure move and cleanup is done from cloud_dev.
    A callback is passed to clean_cloud_volume to test if a cloud file
    needs to be cleaned.

    cloud: implement S3 for part versionning and cleanup

    cloud : file driver versionning implementation.

    cloud: fix Job message.

    cloud: move POOLMEM allocation

    cloud: update move interface.
    Implement was_cloud_driver.

    Cloud: implement exists in move_cloud_part for s3

    cloud: minor bug fixes.

    cloud: adapt google cloud driver to new paradigm

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Sep 6 16:28:12 2019 +0200

    cloud: Keep the error message from close_part() in open_next_part()

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Aug 29 10:10:00 2019 -0400

    cloud: Fix #5373 avoid string overflow on xfer file used to download parts

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Jul 16 12:38:54 2019 -0400

    cloud: Fix #5251 Make sure skipped parts exist in the cache

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jun 27 10:12:50 2019 +0200

    cloud: Fix jobmedia issue after multiple incomplete jobs

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jun 24 07:52:56 2019 -0400

    cloud: mv debug level to 50 and add a DT_CLOUD tag

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu May 16 19:21:14 2019 +0200

    cloud: Fix #4857 about restore error with many parts to download

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Apr 29 10:07:01 2019 -0400

    cloud: compute part hash at upload and download

    Use GENERATE_CLOUD_HASH to enable it.
    Not enabled with S3 cloud.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 22 10:50:06 2019 +0100

    cloud: Handle was driver has a generic drv

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 21 10:21:21 2019 +0100

    Ensure that a job message is printed after some unespected close() errors

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Tue Mar 12 09:26:36 2019 +0100

    cloud: cloud_dev was driver is now generic

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Sun Jan 6 20:45:39 2019 -0200

    cloud: added Swift Cloud Plugin

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 6 10:38:53 2018 +0100

    cloud: Fix .status devices apiV2 output with device type

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Sep 28 13:43:33 2018 +0200

    cloud: display used cloud driver in dev print_type()

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Sep 6 09:49:13 2018 +0200

    cloud: dynamic load cloud drivers within cloud_dev.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Aug 3 18:42:21 2018 +0200

    cloud: Autodetect generic_cloud_driver in plugin folder

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jul 26 10:27:31 2018 +0200

    cloud: Add google and oracle cloud directives handling

    driver files should be located in plugins_directory.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jul 26 13:53:58 2018 +0200

    cloud: Fix wrong driver_command allocation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 17 11:16:44 2018 +0200

    cloud: Improve error message when loading Azure lib

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Dec 20 13:27:27 2017 +0100

    cloud: Fix #3411 Cancel jobs that are using a driver not available

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 15:42:47 2017 +0200

    Decoupled cloud driver interface.

    Cloud drivers are ment to be as standalone as possible. Interface containing DCR and JCR imply huge dependencies. cloud device reference creates circular dependencies.
    I'm removing these reference and modify the code depending on context.
    When JCR is used to JMsg and Qmsg : the message is returned to the caller, in charge to JMsg or Qmsg it if necessary.
    When DCR is used for job cancellation check : a cancel callback function is passed instead.
    Device dependency is only used to call add_vol_and_part. It's been moved to cloud_driver interface and since it's a const function, it's declared static for ease of use.
    cloud_transfer_mgr : is_cancelled renamed to is_canceled.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Aug 9 16:07:47 2017 +0200

    azure: was_driver class and C_WAS_DRIVER enum.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:24:48 2017 +0200

    cloud: Fix #2851 Change the UPLOAD_NO behavior.

    In case the job type is Admin, Console or system, the upload always occurs in UPLOAD_EACHPART mode.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Apr 21 13:57:54 2017 +0200

    cloud plugin transfers status api implementation

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 3 15:27:51 2017 +0100

    cloud: Use unique download filename

    When download fails, delete the tmp file.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Feb 24 14:27:47 2017 +0100

    cloud: Do not upload parts on restore and retry S3_put_object() if possible

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Wed Feb 1 14:44:42 2017 +0100

    cloud: Fix MA #2453 volume parts are always downloaded.

    This is now fixed in download_part_to_cache.
    Also, make sure that upload/download are not terminated FATAL when the cloud is not active (cache can do the job).

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon Jan 30 15:30:55 2017 +0100

    Improve cloud proxy probing and use temporary name during transfer

     - Introducing volume_lookup function. Even an empty volume will not be reloaded if it's been already synchronized.

     - Change bacula_ctx struct to class.
     2 constructors from transfer class or POOLMEM ptr.
     errMsg member is a reference to POOLMEM ptr.
     error msg can safely be re-allocated.

     - Debug display transfer when upload error.
    POOLMEM reference modification.

     - Fix s3_driver crash when libs3 is not present.

     - Use transfer message to report drivers errors.

     - #define temp xfer download file name.

     -  copy download parts to tmp xfert file.
    Rename it to part when transfer is completed.

     - Don't truncate uploaded parts.
    Exclude uploaded parts from the cloud proxy list and pass the resulting list to truncate_cloud_volume.

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Nov 24 16:56:00 2016 +0100

    static transfer_mgr and fix leaks.
    create 2 transfer managers, one for uploads, one for downloads.
    replace tranfer_mgr everywhere it's used (transfer status for download and upload  are separated, making it more accurate).
    Leaks : need to loop <=last_index() otherwise we don't free the last inserted item.
    Transfer argument free is moved inside transfer destructor (eventually, we'll keep access to the arg for the all transfer live cycle. It will be usefull latter).

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Oct 20 17:21:01 2016 +0200

    Call the driver truncate command from the cloud device

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Sep 4 07:18:29 2016 +0200

    Ensure cloud truncate reopens file + cleanup some error messages

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jul 29 11:08:28 2016 +0200

    Make SD drivers print their own type -- eliminates one table

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Jul 10 12:39:23 2016 +0200

    Implement cloud cache open_device()

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

4 years agoBEE Backport bacula/src/stored/butil.c
Alain Spineux [Tue, 12 May 2020 16:42:04 +0000 (18:42 +0200)] 
BEE Backport bacula/src/stored/butil.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Jun 29 20:44:03 2014 +0200

    First cut making bextract-test work for dedup

4 years agoBEE Backport bacula/src/stored/bsdjson.c
Eric Bollengier [Tue, 12 May 2020 16:41:45 +0000 (18:41 +0200)] 
BEE Backport bacula/src/stored/bsdjson.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 4 15:41:15 2020 +0100

    Fix compilation of community version + move dedup configuration functions to external file

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jan 14 15:09:05 2020 +0100

    Add specific checks when TLS PSK is not available in SSL library

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Nov 15 09:12:11 2019 +0100

    cloud: Add support for new cloud directives in bsdjson

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri Mar 22 10:50:06 2019 +0100

    cloud: Handle was driver has a generic drv

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 1 17:33:35 2018 +0100

    cloud: Accept empty Hostname, SecretKey and AccessKey for Generic drivers

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Mar 16 11:35:40 2013 +0100

    Add aligned volume plugin

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 20 10:18:14 2012 +0100

    json: Add MediaType and MaximumBlockSize to bsdjson tool

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Sep 24 17:33:20 2012 +0200

    Add bfdjson + bsdjson + upper/lower case keywords

4 years agoBEE Backport bacula/src/stored/bscan.c
Eric Bollengier [Tue, 12 May 2020 16:41:01 +0000 (18:41 +0200)] 
BEE Backport bacula/src/stored/bscan.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 1 17:40:36 2020 +0200

    Fix #6109 About incorrect delta sequence after bscan

Author: Ana Emilia Machado de Arruda <emiliaarruda@gmail.com>
Date:   Mon Feb 24 16:54:42 2020 +0100

    Add SSL connections to director SQL code

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Sep 6 16:59:08 2019 +0200

    Add -dXX,tags support in bscan

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 1 10:37:47 2019 +0100

    bscan: Change volume status from Purged/Recycled to Archive if we recover a Job

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Feb 21 13:16:37 2019 +0100

    bscan some missing free_jcr()

    - use a global free_jcr() for a single get_jcr_by_session() instead of one
      per case (some case dont have a appropriate free_jcr())

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Oct 29 11:52:04 2018 +0100

    Add PLUGIN_NAME support for bscan

4 years agoBEE Backport bacula/src/stored/bls.c
Alain Spineux [Tue, 12 May 2020 16:40:28 +0000 (18:40 +0200)] 
BEE Backport bacula/src/stored/bls.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Dec 16 17:31:23 2016 +0100

    Enhance bls -D/-F help message

4 years agoBEE Backport bacula/src/stored/block_util.c
Eric Bollengier [Tue, 12 May 2020 16:40:07 +0000 (18:40 +0200)] 
BEE Backport bacula/src/stored/block_util.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Feb 22 14:43:32 2019 +0100

    Fix file:block display on some error messages

    The dev->file and dev->block_num are 0 when used in this function.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 23 10:05:32 2016 +0100

    Fix #1674 About Solaris Intel SD checksum errors

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Oct 21 20:20:00 2012 +0200

    Refactor block.c + do JobMedia only on ameta device

4 years agoBEE Backport bacula/src/stored/block.h
Eric Bollengier [Tue, 12 May 2020 16:39:53 +0000 (18:39 +0200)] 
BEE Backport bacula/src/stored/block.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

4 years agoBEE Backport bacula/src/stored/block.c
Eric Bollengier [Tue, 12 May 2020 16:39:47 +0000 (18:39 +0200)] 
BEE Backport bacula/src/stored/block.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun May 10 15:38:30 2020 +0200

    Make reading a short block a warning rather than error

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 6 11:50:01 2020 +0100

    Do not abort jobs when the disk is full

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Feb 22 13:35:25 2019 +0100

    Scan volume byte per byte after a record error to find the next valid record with the -p option

Author: V. Novy <bacula@vnovy.net>
Date:   Sun Nov 19 12:57:03 2017 +0100

    Apply patches from bugs #2325 and #2326 to fix FIFO bugs

4 years agoBEE Backport bacula/src/stored/bextract.c
Eric Bollengier [Tue, 12 May 2020 16:38:31 +0000 (18:38 +0200)] 
BEE Backport bacula/src/stored/bextract.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Aug 13 10:06:32 2014 +0200

    Make bextract able to handle dedup streams

4 years agoBEE Backport bacula/src/stored/bcopy.c
Git Backport Process [Tue, 12 May 2020 16:38:15 +0000 (18:38 +0200)] 
BEE Backport bacula/src/stored/bcopy.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jan 4 18:52:08 2013 +0100

    Add Demo to the -? output if demo version

    Conflicts:

            bacula/src/dird/dird.c
            bacula/src/tools/dbcheck.c

4 years agoBEE Backport bacula/src/stored/authenticate.c
Alain Spineux [Tue, 12 May 2020 16:37:15 +0000 (18:37 +0200)] 
BEE Backport bacula/src/stored/authenticate.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Apr 12 04:55:10 2019 +0200

    PSK: encrypt copy jobs (SD-SD )

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Apr 8 14:56:45 2019 +0200

    PSK: Modify authentication in each daemon to support PSK

    - use AuthenticateBase class

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 12 10:01:54 2015 +0100

    Ensure that only one thread can use the auth code in the Storage

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Jun 20 21:32:36 2014 +0200

    Refactor the SD Hello code to put it all in hello.c

4 years agoBEE Backport bacula/src/stored/askdir.c
Eric Bollengier [Tue, 12 May 2020 16:37:09 +0000 (18:37 +0200)] 
BEE Backport bacula/src/stored/askdir.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Mar 2 11:44:32 2020 +0100

    Fix low space detection in the Find next volume loop

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 6 11:51:01 2020 +0100

    Fix #3246 Do not create volumes when the disk space is low

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Oct 3 17:30:42 2018 +0200

    Fix bugs #2335 and #2349 Volume messages printed many times

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Oct 1 11:38:02 2018 +0200

    Implement WORM support

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Oct 2 09:34:51 2017 +0200

    Fix #2022 about a problem to find free volumes in a Pool with more than 30 devices in use

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Dec 7 15:21:45 2014 +0100

    #776 Volume created in the catalog but not on disk and #464 SD can't read an existing volume

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun May 18 15:34:37 2014 +0200

    Add VolType to Catalog

4 years agoBEE Backport bacula/src/stored/append.c
Alain Spineux [Tue, 12 May 2020 16:36:57 +0000 (18:36 +0200)] 
BEE Backport bacula/src/stored/append.c

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Mar 28 13:48:00 2018 +0200

    Add prepare bit to the plugin stream and handle it in the SD

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Oct 28 17:55:18 2012 +0100

    Add adata header queue code

4 years agoBEE Backport bacula/src/stored/aligned_dev.h
Alain Spineux [Tue, 12 May 2020 16:35:59 +0000 (18:35 +0200)] 
BEE Backport bacula/src/stored/aligned_dev.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jan 25 18:02:15 2019 +0100

    aligned: Fix #4547 about orphan file descriptors after the truncate command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 19 21:13:24 2018 +0200

    aligned: Fix RecNum count with non standard data packet size

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Oct 10 14:07:58 2017 +0200

    BIG backport of the devices from Community 9.0

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Feb 9 12:43:16 2014 +0100

    Define classes for most device types

4 years agoBEE Backport bacula/src/stored/acquire.c
Norbert Bizet [Tue, 12 May 2020 16:35:16 +0000 (18:35 +0200)] 
BEE Backport bacula/src/stored/acquire.c

This commit is the result of the squash of the following main commits:

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Mon May 22 16:36:40 2017 +0200

    cloud: Add "Manual" cloud upload option and add truncate option to the upload command.

4 years agoBEE Backport bacula/src/stored/Makefile.in
Eric Bollengier [Tue, 12 May 2020 16:34:35 +0000 (18:34 +0200)] 
BEE Backport bacula/src/stored/Makefile.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 19:28:35 2020 +0100

    Fix community build

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Thu Jun 21 18:19:05 2018 +0200

    cloud: First implementation and scenario test for generic_driver

Author: Norbert Bizet <norbert.bizet@baculasystems.com>
Date:   Fri May 4 10:07:23 2018 +0200

    cloud: disable was and s3 build based on configure

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Nov 2 09:46:02 2017 +0100

    regress: Add bcloud tool for cloud tests

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jan 31 18:25:41 2017 +0100

    Add specific Makefile targets for cloud/dedup/aligned drivers

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Oct 9 15:09:37 2016 +0200

    Implement tape alerts

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Jul 10 11:25:45 2016 +0200

    Make cloud driver dynamic shared object

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Jun 21 11:07:09 2016 +0200

    More work on separating dedup and aligned into loadable SD drivers

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jun 16 18:40:26 2016 +0200

    Implement driver classes + loadable drivers + first cut cloud driver

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed May 20 15:19:12 2015 +0200

    Fix Makefile.in tabs

4 years agoBEE Backport bacula/src/tools/test_tags.c
Eric Bollengier [Tue, 12 May 2020 08:47:49 +0000 (10:47 +0200)] 
BEE Backport bacula/src/tools/test_tags.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 28 10:40:15 2019 +0100

    Update copyright year

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 6 15:17:45 2018 +0200

    regress: Add unittests for tags, bpipe and breaddir

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sat Aug 30 07:57:09 2014 +0200

    regress: Add small tool to test debug tags

4 years agoBEE Backport bacula/src/tools/joblist.c
Eric Bollengier [Tue, 12 May 2020 08:45:49 +0000 (10:45 +0200)] 
BEE Backport bacula/src/tools/joblist.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 26 08:49:52 2020 +0100

    regress: Test long keys in joblist_test

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Mar 16 15:09:33 2020 +0100

    regress: Add first cut of joblist unittest

4 years agoBEE Backport bacula/src/tools/cdp-client
Henrique [Tue, 12 May 2020 08:27:31 +0000 (10:27 +0200)] 
BEE Backport bacula/src/tools/cdp-client

This commit is the result of the squash of the following main commits:

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon Jan 27 15:32:30 2020 -0300

    cdp: fixed compilation warning about comparison between signed and unsigned integers

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon Nov 11 11:28:29 2019 -0300

    cdp: fixed missing file copy to spool-dir when a sed command is issued

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed Nov 6 01:12:36 2019 -0300

    cdp: fixed Windows compilation

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Jul 30 15:12:48 2019 -0300

    cdp-client:

    1) Fixed error where folderwatcher hangs if a file is being copied or moved
    2) Fixed folderwatcher Unit Tests
    3) Added unit test for file copies

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed Jun 26 12:03:27 2019 -0300

    android: added missing license and a few comments on src files. FD debug level reduced to 50

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Fri Jun 21 11:26:01 2019 -0300

    cdp: Fix #5085 about wrong windows backlashes

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 22 03:44:45 2019 -0300

    cdp: fix #5066 about restore error on Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon May 20 10:32:13 2019 -0300

    cdp-client: added timeout on wait for Windows file lock release

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon May 20 00:46:24 2019 -0300

    cdp-client: tweak debug messages

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Sun May 19 23:17:04 2019 -0300

    cdp: fix about file copy on Windows not working (Windows was keeping the file lock)

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Thu May 16 22:18:51 2019 -0300

    cdp-client: fixed FolderWatcher removal

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Thu May 16 02:05:24 2019 -0300

    cdp: fixed deadlock

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Thu May 16 01:25:56 2019 -0300

    cdp: Fix #5049 about file change not being notified

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 23:50:46 2019 -0300

    cdp-client: inotify fix

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 20:46:59 2019 -0300

    cdp-client: fixed copyfile function for Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 19:21:25 2019 -0300

    cdp-client: fixed compilation for Windows by creating copyfile function for Windows on bsys.c

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 02:17:53 2019 -0300

    cdp-client: started watching for file name changes on Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 01:45:13 2019 -0300

    cdp-client: fixed notification changes on Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed May 15 01:43:38 2019 -0300

    cdp-client: tweak refactor

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue May 14 13:32:30 2019 -0300

    cdp-client: added compatibility with Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue May 7 16:07:00 2019 -0300

    tray-monitor: added text link to spool directory and journal file on folder selection screen

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue May 7 14:03:57 2019 -0300

    cdp: removed incorrect pthread_exit()

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue May 7 13:56:21 2019 -0300

    cdp: fixed usage of threads and synchronization of inotify thread

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 7 12:59:56 2019 +0200

    cdp-client: Make the code compatible with lock manager

Author: Eric Bollengier <eric.bollengier@baculasystems.com>
Date:   Fri May 3 09:04:25 2019 +0000

    cdp: Fix windows cdp-client build

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Thu May 2 21:19:33 2019 -0300

    cdp: Fix #4991 about userHome usage

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 30 12:53:09 2019 -0300

    cdp-client: fix windows compilation

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 30 10:59:09 2019 -0300

    cdp-client: fix class initializer

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 23 22:22:29 2019 -0300

    cdp-client: created folderwatcher implementation for Windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 30 12:53:09 2019 -0300

    cdp-client: fix windows compilation

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 30 10:59:09 2019 -0300

    cdp-client: fix class initializer

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 26 09:59:19 2019 +0200

    Fix tray monitor compilation on windows

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Sun Apr 21 22:19:20 2019 -0300

    cdp-client: creating folderwatcher for Windows

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 9 18:24:52 2019 +0200

    cdp: Fix compilation on old GCC

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Tue Apr 9 13:13:24 2019 -0300

    cdp-client: changed variable initialization to constructor

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 9 13:24:23 2019 +0200

    Fix cdp-client compilation

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon Apr 8 18:45:11 2019 -0300

    cdp-client: fixed Windows compilation

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Mon Apr 8 17:42:49 2019 -0300

    cdp-client: tweak

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Apr 8 19:00:43 2019 +0200

    Move cdp code into tools/cdp-client

4 years agoBEE Backport bacula/src/tools/bwild.c
Eric Bollengier [Tue, 12 May 2020 08:27:18 +0000 (10:27 +0200)] 
BEE Backport bacula/src/tools/bwild.c

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/tools/bsparse.c
Eric Bollengier [Tue, 12 May 2020 08:26:54 +0000 (10:26 +0200)] 
BEE Backport bacula/src/tools/bsparse.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 28 10:40:15 2019 +0100

    Update copyright year

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Apr 6 10:38:12 2017 +0200

    Add bsparse tool

4 years agoBEE Backport bacula/src/tools/bsock_meeting_test.c
Eric Bollengier [Tue, 12 May 2020 08:26:34 +0000 (10:26 +0200)] 
BEE Backport bacula/src/tools/bsock_meeting_test.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 20 14:53:33 2019 +0100

    Add FD Calls Director feature to ease client behind NAT access

     - Implement scheduler in Client side to activate the feature
     - Refactor Run resource between the director and the file daemon
     - Allow to use the Director resource to connect a Director for the proxy command and the FDCallsDir
     - Add FDCallsDir state in show client
     - Add code to handle permanent connections bsock_meeting

    New Directive
     FileDaemon:Director:FDCallsDir=<yes/no>
     FileDaemon:Director:FDCallsDirReconnect=<time>
     FileDaemon:Director:FDCallsDirSchedule=<resource>

     Director:Client:FDCallsDir=<yes/no>

    New Resource
     FileDaemon:Schedule

4 years agoBEE Backport bacula/src/tools/bsnapshot.c
Eric Bollengier [Tue, 12 May 2020 08:26:28 +0000 (10:26 +0200)] 
BEE Backport bacula/src/tools/bsnapshot.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jun 3 17:09:45 2019 +0200

    Fix compilation of bsnapshot on Fedora

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Aug 24 12:00:37 2018 +0200

    snapshot: redirect Bacula's Dmsg() output to logfile instead of STDOUT

    - It is not possible to use bsnapshot with a debug level > 100
    - Dmsg() emitted by Bacula's libraries are going into STDOUT when
      the "trace" is not setup
    - This setup the messages.c File *trace_fd to the one used by
      bsnapshot
    - All the log are now using into bsnapshot.log

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Jul 25 17:28:42 2018 +0200

    snapshot: Add mountopts bsnapshot.conf option

    $ cat bsnapshot.conf
    mountopts=noexec,nodev             <---  default
    mountopts=/dev/vgroot/root:nouuid            <---- for one device
    mountopts=/dev/vgroot/home:nouuid,uid=backup <---- for one device

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed May 16 17:44:07 2018 +0200

    snapshot: Add debug for system commands

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Dec 13 15:19:37 2017 +0100

    snapshot: Add support for LVM 1.02/2.02

    The Attr lvs/vgs attribute is now at the end of the output, so
    we must treat \n as a attribute separator.

    The Time parameter was renamed CTime in lvs output.

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Nov 14 09:59:07 2017 +0100

    fix #3297 lvm_snapshot_size  in % ignored, default 10% always used

    - poor integer arithmetic

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 5 09:42:01 2015 +0100

    Add Snapshot Engine to bacula core

            Rename jcr->VSS to jcr->Snapshot and use the same variable on Linux/Windows
            Pass snapshot retention to the FD
            Add SnapshotRetention to client and job resource
            Add documentation about snapshot backend
            regress: Add snapshot script for lvm backend
            Use retry in lvm unmount procedure
            Read config file from sysconfigdir
            Load bsnapshot.cfg by default and configure bsnapshot using exepath
            Add config file to specify lvm snapshot parameters
            Control LVM free space for snapshot
            Implement OT_PINT64 in output writer, should display job speed api2 mode status command
            regress: Add test to test snapshot bconsole commands
            regress: Add test for zfs snapshot
            implement zfs driver (linux zfs driver cannot mount snapshots)
            regress: Add regress script for snapshots
            Include automatically subvolumes with onefs=no
            Handle ff->link in strip snapshot path
            Scan for subvolumes not listed in mtab
            Snapshots can be created/deleted from the catalog
            Implement path translation between snapshot
            Add JobId to Snapshot table
            Add code to execute snapshot script on the FD side
            Add more Director snapshots command
            Implement CatReq interface for Snapshots
            Implement DB snapshot functions
            the delete snapshot is now connecting to the FD, and the
            FD is calling the snapshot script with the delete argument
            Allow to specify env variable in run_command_full_output() and open_bpipe()
            Modify cmd_parser to not look for plugin name with use_name option
            Add ARG_LIST to generate nice arg1=arg2 output from db_list function
            Add tag DT_SNAPSHOT
            Add JobId in the list snapshot output
            Add list snapshot command
            Add JobId to snapshot table

4 years agoBEE Backport bacula/src/tools/bsmtp.c
Alain Spineux [Tue, 12 May 2020 08:26:06 +0000 (10:26 +0200)] 
BEE Backport bacula/src/tools/bsmtp.c

This commit is the result of the squash of the following main commits:

Author: Alain Spineux <alain@baculasystems.com>
Date:   Wed Nov 6 13:20:16 2019 +0100

    Fix MA#5588 bsmtp: add support for Sender and custom header

    Add 2 new options (from the new man page)

     -S sender
        Set the Sender: header.

     -H header_line
        Add  a  custom  header line to the mail header.
        You can use this option up to 10 times.
        The header_line must be a single line
        that follows RFC2822 syntax, for example "Keywords: bacula".
        Don't forget to protect the space just after the ":"

4 years agoBEE Backport bacula/src/tools/bregtest.c
Eric Bollengier [Tue, 12 May 2020 08:25:56 +0000 (10:25 +0200)] 
BEE Backport bacula/src/tools/bregtest.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 29 14:03:52 2018 +0100

    Use bfopen() instead of fopen() for the CLOEXEC option

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 27 09:33:45 2017 +0200

    Add ability to replace by the file mtime in a Bacula RegexWhere expression

4 years agoBEE Backport bacula/src/tools/bregex.c
Eric Bollengier [Tue, 12 May 2020 08:25:27 +0000 (10:25 +0200)] 
BEE Backport bacula/src/tools/bregex.c

This commit is the result of the squash of the following main commits:

4 years agoBEE Backport bacula/src/tools/Makefile.in
Eric Bollengier [Tue, 12 May 2020 08:24:24 +0000 (10:24 +0200)] 
BEE Backport bacula/src/tools/Makefile.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Mar 16 15:09:33 2020 +0100

    regress: Add first cut of joblist unittest

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Mar 20 14:53:33 2019 +0100

    Add FD Calls Director feature to ease client behind NAT access

     - Implement scheduler in Client side to activate the feature
     - Refactor Run resource between the director and the file daemon
     - Allow to use the Director resource to connect a Director for the proxy command and the FDCallsDir
     - Add FDCallsDir state in show client
     - Add code to handle permanent connections bsock_meeting

    New Directive
     FileDaemon:Director:FDCallsDir=<yes/no>
     FileDaemon:Director:FDCallsDirReconnect=<time>
     FileDaemon:Director:FDCallsDirSchedule=<resource>

     Director:Client:FDCallsDir=<yes/no>

    New Resource
     FileDaemon:Schedule

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 19 19:00:49 2019 +0100

    Add tool to re-create io errors during regress

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sun Jan 27 11:11:21 2019 +0100

    Disable building cats_test while compile is broken

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Oct 16 09:53:32 2018 +0200

    Fix xattr_append_test build

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 20 17:11:18 2018 +0200

    unittests: Add unittest for xattr_list_append()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Sep 11 09:38:00 2018 +0200

    Add install-unittests target to tools/Makefile.in

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 6 15:17:45 2018 +0200

    regress: Add unittests for tags, bpipe and breaddir

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Apr 6 10:38:12 2017 +0200

    Add bsparse tool

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Oct 18 18:07:24 2016 +0200

    Add DirectoryACL and UserIdACL directives to the Console resource

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 10 18:21:44 2016 +0100

    Add hdtest tool to test posix WILLNEED

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Jan 15 20:12:44 2016 +0100

    fix dependency problem for test-dedup.c in ./configure

    add include directories for "make depend"

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Jun 5 18:04:12 2015 +0200

    move stored/test-dedup to tools/test-dedup

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sat Aug 30 07:57:09 2014 +0200

    regress: Add small tool to test debug tags

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Aug 7 18:05:53 2014 +0200

    Add small tool to test threads

Author: Alain Spineux <alain@baculasystems.com>
Date:   Sun Apr 6 20:05:35 2014 +0200

    Beginning of dedup code

Author: Martin Simmons <martin@lispworks.com>
Date:   Wed Nov 9 19:13:33 2011 +0100

    Put libraries in the correct order for non shared libs.

Signed-off-by: Marco van Wieringen <mvw@planets.elm.net>
Author: Marco van Wieringen <mvw@planets.elm.net>
Date:   Tue Aug 2 23:03:19 2011 +0200

    Make doesn't like non tabbed target rules.

Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Mon Jul 18 22:22:17 2011 +0200

    Add small tool to test bandwidth

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Feb 3 22:10:01 2011 +0100

    Remove reference to @SQL_INC@ in tools Makefile.in

4 years agoRemove create_test_database
Eric Bollengier [Tue, 12 May 2020 08:19:19 +0000 (10:19 +0200)] 
Remove create_test_database

4 years agoBEE Backport bacula/src/cats/sql_list.c
Eric Bollengier [Tue, 12 May 2020 08:16:21 +0000 (10:16 +0200)] 
BEE Backport bacula/src/cats/sql_list.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 10:27:09 2020 +0200

    Add update jobid=x reviewed=y command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 20:16:22 2020 +0200

    Reliably log user activity in a way that satisfies auditors

    Messages {
      name = Standard
      append = /tmp/bacula.log = all

      # To send the events into a log and in the catalog
      append = /tmp/audit.log = events, !events.bweb
      catalog = all, events
    }

    Users can create custom events with a console command:

    .events

    They can list events in the catalog with

    * list events
    +---------------------+------------+-----------+--------------------------------+
    | time                | type       | source    | events                         |
    +---------------------+------------+-----------+--------------------------------+
    | 2020-04-24 17:04:07 | daemon     | *Daemon*  | Director startup               |
    | 2020-04-24 17:04:12 | connection | *Console* | Connection from 127.0.0.1:8101 |
    | 2020-04-24 17:04:20 | command    | *Console* | purge jobid=1                  |
    +---------------------+------------+-----------+--------------------------------+

    The event format in the log is:

    24-Apr 17:04 Events: code=DC0001 from=zog8-dir ref=0x1fa5 type=daemon source=*Daemon* text=Director startup

    24-Apr 17:04 Events: code=DC0002 from=zog8-dir ref=0x7fb58000c4b8 type=connection source=*Console* text=Connection from 127.0.0.1:8101

    The reference (ref) is used to identify a console session, all activity
    from the same console will have the same reference.

    The source is the name of the restricted console, or *Console* if this
    is the default console.

    We have the following events:
     - cancel a job
     - delete volume
     - delete job
     - purge job
     - delete pool
     - delete client
     - daemon startup
     - daemon shutdown
     - console connection
     - console disconnection

    To add a new events:
    ua->send_events(type, format, arguments);

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Oct 6 15:18:55 2017 +0200

    cats: Modify db_list_files() to accept a callback

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 28 16:46:19 2017 +0200

    Add SQL functions to list RestoreObjects and files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Oct 25 11:56:11 2016 +0200

    Allow to specify ACLs to restrict sql_list output

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Oct 5 09:43:58 2016 +0200

    Add level= and jobtype= parameters to the "list jobs" command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue May 17 11:16:02 2016 +0200

    Add BEEF marks for FileMedia feature

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 10 15:44:01 2015 +0100

    Add optional parameters to db_list_job_records()

    It is now possible to specify
     - ClientId
     - JobErrors
     - JobStatus
     - Job Type
     - order ASC/DESC

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Apr 17 18:33:35 2015 +0200

    Refactor DB engine to be class based

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 5 09:42:01 2015 +0100

    Add Snapshot Engine to bacula core

            Rename jcr->VSS to jcr->Snapshot and use the same variable on Linux/Windows
            Pass snapshot retention to the FD
            Add SnapshotRetention to client and job resource
            Add documentation about snapshot backend
            regress: Add snapshot script for lvm backend
            Use retry in lvm unmount procedure
            Read config file from sysconfigdir
            Load bsnapshot.cfg by default and configure bsnapshot using exepath
            Add config file to specify lvm snapshot parameters
            Control LVM free space for snapshot
            Implement OT_PINT64 in output writer, should display job speed api2 mode status command
            regress: Add test to test snapshot bconsole commands
            regress: Add test for zfs snapshot
            implement zfs driver (linux zfs driver cannot mount snapshots)
            regress: Add regress script for snapshots
            Include automatically subvolumes with onefs=no
            Handle ff->link in strip snapshot path
            Scan for subvolumes not listed in mtab
            Snapshots can be created/deleted from the catalog
            Implement path translation between snapshot
            Add JobId to Snapshot table
            Add code to execute snapshot script on the FD side
            Add more Director snapshots command
            Implement CatReq interface for Snapshots
            Implement DB snapshot functions
            the delete snapshot is now connecting to the FD, and the
            FD is calling the snapshot script with the delete argument
            Allow to specify env variable in run_command_full_output() and open_bpipe()
            Modify cmd_parser to not look for plugin name with use_name option
            Add ARG_LIST to generate nice arg1=arg2 output from db_list function
            Add tag DT_SNAPSHOT
            Add JobId in the list snapshot output
            Add list snapshot command
            Add JobId to snapshot table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 26 13:57:34 2013 +0200

    Merge Filename table to File

4 years agoBEE Backport bacula/src/cats/drop_postgresql_tables.in
Kern Sibbald [Tue, 12 May 2020 08:15:13 +0000 (10:15 +0200)] 
BEE Backport bacula/src/cats/drop_postgresql_tables.in

This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Jan 15 21:09:31 2020 +0100

    Use if exists on dropping all postgresql tables

4 years agoBEE Backport bacula/src/cats/delete_catalog_backup.in
Eric Bollengier [Tue, 12 May 2020 08:13:19 +0000 (10:13 +0200)] 
BEE Backport bacula/src/cats/delete_catalog_backup.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Apr 1 09:01:56 2019 +0200

    Fix #4778 about incorrect comment in delete_catalog_backup script

4 years agoBEE Backport bacula/src/cats/update_sqlite3_tables.in
Eric Bollengier [Mon, 11 May 2020 15:18:26 +0000 (17:18 +0200)] 
BEE Backport bacula/src/cats/update_sqlite3_tables.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 29 13:52:04 2020 +0200

    Update SQL scripts for Events table. Catalog format 1022

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Oct 18 12:56:15 2018 +0200

    catalog: fix mixed catalog upgrade issues

    - Some upgrade procedures are not run when appropriate
    - Fix some version issues in comments and messages

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Aug 11 21:20:22 2018 +0200

    Permit catalog to contain negative FileIndexes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:13:54 2018 +0100

    Add Pool::MaxPoolBytes to the catalog. Catalog version is now 1020

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jan 5 20:27:33 2017 +0100

    Add CacheRetention to the Media table

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Jan 2 13:32:50 2017 +0100

    Fix bad definition of LastPartSize in update tables

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Oct 11 09:48:34 2016 +0200

    Add new Cloud part info to catalog - update database version to 1019

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 24 16:46:46 2015 +0100

    Upgrade catalog version to 1017

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sun Nov 3 17:32:19 2013 +0100

    Add missing FileTable column on JobHisto table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Sep 20 16:49:17 2013 +0200

    Add FileTable attribute in Job table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 19 16:28:34 2013 +0200

    Add migration script for SQLite3

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri May 3 13:24:07 2013 +0200

    Cleanup update_xxxx_tables.in

    The script is now updating the schema step by step from version 12 to
    version 1015.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu May 2 17:13:05 2013 +0200

    Add Holes to catalog

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Feb 5 12:37:33 2013 +0100

    Add VolABytes to Media record + adapt Bacula code new DB version 1015

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 28 17:04:26 2012 +0100

    Add Incomplete status in make_xxx_tables and update_xxx_tables

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 23 11:39:53 2012 +0100

    Add update procedure from 5.2

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 15 15:27:23 2012 +0100

    Update update_xxx_tables scripts for version 1014

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 30 13:19:07 2012 +0100

    Update update_xxx_tables to convert 12,13 to 14

4 years agoBEE Backport bacula/src/cats/update_postgresql_tables.in
Eric Bollengier [Mon, 11 May 2020 15:18:06 +0000 (17:18 +0200)] 
BEE Backport bacula/src/cats/update_postgresql_tables.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 29 13:52:04 2020 +0200

    Update SQL scripts for Events table. Catalog format 1022

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 5 11:37:45 2019 +0100

    Modify SQL upgrade scripts for format 1021

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Dec 6 10:19:13 2018 +0100

    Add procedure to upgrade from catalog version 16 to 1020

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Feb 16 17:47:54 2018 +0100

    Add catalog Job column PriorJob

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:13:54 2018 +0100

    Add Pool::MaxPoolBytes to the catalog. Catalog version is now 1020

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 23 10:10:58 2017 +0100

    Adapt update_bacula_tables scripts for catalog version 15

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Dec 1 10:29:47 2016 +0100

    Fix bug 2275 Postgresql update script failure and add CloudParts in Media table

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Oct 11 09:48:34 2016 +0200

    Add new Cloud part info to catalog - update database version to 1019

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Aug 1 17:24:28 2016 +0200

    Make update_xxx_tables script explanation clearer

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jun 11 17:15:34 2015 +0200

    Fix error in update_postgresql_tables.in caused by bad search and replace

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Mar 9 08:23:34 2015 +0100

    Add --stop1016 option to update_postgresql-_tables.in script

      The option is used by the debian upgrade script. Each step is handled
      automatically by the package.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 24 16:46:46 2015 +0100

    Upgrade catalog version to 1017

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Nov 25 13:53:45 2013 +0100

    Enhance postgresql upgrade script to avoid writing WALs while loading the File table

    Need to use:
    archive_mode=off
    wal_level=minimal

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sun Nov 3 17:32:19 2013 +0100

    Add missing FileTable column on JobHisto table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Sep 23 15:56:34 2013 +0200

    Remove the temporary file with the File table export at the end of the update

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Sep 20 16:49:17 2013 +0200

    Add FileTable attribute in Job table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Sep 19 13:29:23 2013 +0200

    Fix #8269 about VolWrites overflow for PostgreSQL backend

      - Change VolWrites (not really used other than for external statistics) from 32bit to 64bit

        Error: sql_update.c:411 sql_update.c:411 update UPDATE Media SET VolJobs=1,VolFiles=1,VolBlocks=13409927,VolBytes=865101275136,VolMounts=317,VolErrors=0,VolWrites=2160216210,MaxVolBytes=1609538994176,VolStatus='Append',Slot=3,InChanger=1,VolReadTime=3467657,VolWriteTime=681603738721,VolParts=0,LabelType=0,StorageId=3,PoolId=14,VolRetention=86400,VolUseDuration=1,MaxVolJobs=0,MaxVolFiles=0,Enabled=1,LocationId=0,ScratchPoolId=0,RecyclePoolId=0,RecycleCount=314,Recycle=1,ActionOnPurge=0 WHERE VolumeName='005045L5' failed:
    ERROR:  integer out of range

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Sep 18 16:03:16 2013 +0200

    More work on upgrade scripts

     - use work_mem and maintenance_work_mem
     - allow to use pigz or pbzip2 to compress data

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Aug 28 13:49:30 2013 +0200

    More work on migration scripts

     - Fix hardlink-test
     - Ensure that the mysql migration script will stop if having error

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri May 3 13:24:07 2013 +0200

    Cleanup update_xxxx_tables.in

    The script is now updating the schema step by step from version 12 to
    version 1015.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Feb 5 12:37:33 2013 +0100

    Add VolABytes to Media record + adapt Bacula code new DB version 1015

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 23 11:39:53 2012 +0100

    Add update procedure from 5.2

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 15 15:27:23 2012 +0100

    Update update_xxx_tables scripts for version 1014

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 30 13:19:07 2012 +0100

    Update update_xxx_tables to convert 12,13 to 14

4 years agoBEE Backport bacula/src/cats/update_mysql_tables.in
Eric Bollengier [Mon, 11 May 2020 15:17:26 +0000 (17:17 +0200)] 
BEE Backport bacula/src/cats/update_mysql_tables.in

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Apr 29 13:52:04 2020 +0200

    Update SQL scripts for Events table. Catalog format 1022

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Dec 6 10:19:13 2018 +0100

    Add procedure to upgrade from catalog version 16 to 1020

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Aug 11 21:20:22 2018 +0200

    Permit catalog to contain negative FileIndexes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jun 21 17:04:46 2018 +0200

    Fix #3904 about MySQL 5.7 issue with Job/JobHisto:PriorJob field

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:13:54 2018 +0100

    Add Pool::MaxPoolBytes to the catalog. Catalog version is now 1020

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 23 10:10:58 2017 +0100

    Adapt update_bacula_tables scripts for catalog version 15

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Dec 1 10:29:47 2016 +0100

    Fix bug 2275 Postgresql update script failure and add CloudParts in Media table

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Oct 11 09:48:34 2016 +0200

    Add new Cloud part info to catalog - update database version to 1019

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Aug 2 14:59:57 2016 +0200

    Fix copy/paste typo in update_mysql_tables.in reported by Marcin

Author: Kern Sibbald <kern@sibbald.com>
Date:   Mon Aug 1 17:24:28 2016 +0200

    Make update_xxx_tables script explanation clearer

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 24 16:46:46 2015 +0100

    Upgrade catalog version to 1017

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu May 1 13:07:17 2014 +0200

    Fix #10747 about MySQL database creation/upgrade script

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sun Nov 3 17:32:19 2013 +0100

    Add missing FileTable column on JobHisto table

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Oct 3 11:37:07 2013 +0200

    Update Catalog to 1016 and add Snapshot tables

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Aug 28 13:49:30 2013 +0200

    More work on migration scripts

     - Fix hardlink-test
     - Ensure that the mysql migration script will stop if having error

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri May 3 13:24:07 2013 +0200

    Cleanup update_xxxx_tables.in

    The script is now updating the schema step by step from version 12 to
    version 1015.

Author: Kern Sibbald <kern@sibbald.com>
Date:   Tue Feb 5 12:37:33 2013 +0100

    Add VolABytes to Media record + adapt Bacula code new DB version 1015

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 23 11:39:53 2012 +0100

    Add update procedure from 5.2

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Feb 15 15:27:23 2012 +0100

    Update update_xxx_tables scripts for version 1014

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Jan 30 13:19:07 2012 +0100

    Update update_xxx_tables to convert 12,13 to 14

4 years agoBEE Backport bacula/src/cats/sqlite.c
Eric Bollengier [Mon, 11 May 2020 15:16:39 +0000 (17:16 +0200)] 
BEE Backport bacula/src/cats/sqlite.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 3 11:48:33 2020 +0100

    Remove BEEF from FileMedia table

Author: Ana Emilia Machado de Arruda <emiliaarruda@gmail.com>
Date:   Mon Feb 24 16:47:40 2020 +0100

    Add SSL connections to database open code

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri May 17 10:08:22 2019 +0200

    Implement REGEXP operator for SQLite

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 26 10:21:14 2019 +0200

    Fix #4817 about BVFS query issue with SQLite

Author: Alain Spineux <alain@baculasystems.com>
Date:   Thu Dec 21 17:02:20 2017 +0100

    fix: cannot always load RestoreObject from sqlite, misuse of base64_to_bin()

    - base64_to_bin() need to have a dest_size sometime bigger than required
      because it don't know if src is padded or not.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Oct 25 11:56:11 2016 +0200

    Allow to specify ACLs to restrict sql_list output

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat May 30 14:32:07 2015 +0200

    Revert most of patch ef57e6c4 and replace with old cats code

4 years agoBEE Backport bacula/src/cats/sql_update.c
Eric Bollengier [Mon, 11 May 2020 15:16:26 +0000 (17:16 +0200)] 
BEE Backport bacula/src/cats/sql_update.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

4 years agoBEE Backport bacula/src/cats/sql_get.c
Eric Bollengier [Mon, 11 May 2020 15:13:47 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_get.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 10:27:09 2020 +0200

    Add update jobid=x reviewed=y command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Mar 6 16:25:13 2020 +0100

    Move MaxPoolBytes checks in bee files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jun 18 15:12:54 2019 +0200

    Fix #5173 about incorrect behavior of the "delete pool" command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Dec 14 10:16:15 2018 +0100

    Add update command to set the Job comment field

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Aug 11 21:20:22 2018 +0200

    Permit catalog to contain negative FileIndexes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 19 09:34:05 2018 +0100

    Fix possible issue with db_get_pool_numvols() after a SQL error

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

Author: Alain Spineux <alain@baculasystems.com>
Date:   Fri Sep 22 12:35:04 2017 +0200

    fix: it was possible to truncate non purged volumes

    - jobs related to the truncated volumes were remaining in the catalog
    - bug introduced in 8.8

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 28 16:46:19 2017 +0200

    Add SQL functions to list RestoreObjects and files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Apr 17 18:33:35 2015 +0200

    Refactor DB engine to be class based

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Sep 23 10:44:15 2013 +0200

    Add db_get_restoreobject_record() and db_list_restoreobject()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 26 13:57:34 2013 +0200

    Merge Filename table to File

4 years agoBEE Backport bacula/src/cats/sql_find.c
Eric Bollengier [Mon, 11 May 2020 15:13:38 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_find.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Mar 28 10:05:52 2019 +0100

    Make FileSetId optional in db_find_last_job_start_time()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Jul 13 14:00:14 2018 +0200

    Fix GCC 8 compiler warnings with memset() on objects

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Jan 5 09:14:00 2017 +0100

    Change volume type for dedup volumes

4 years agoBEE Backport bacula/src/cats/sql_delete.c
Eric Bollengier [Mon, 11 May 2020 15:13:32 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_delete.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Jun 18 15:18:18 2019 +0200

    Do not delete volumes in db_delete_pool_record()

    The volume deletion is now inside the ua_cmd "delete pool" command.

    When we delete a volume record, JobMedia and Jobs were left untouched
    leading to a situation where jobs are in the catalog, but cannot be
    restored.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Apr 17 18:33:35 2015 +0200

    Refactor DB engine to be class based

4 years agoBEE Backport bacula/src/cats/sql_create.c
Eric Bollengier [Mon, 11 May 2020 15:13:23 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_create.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 24 20:16:22 2020 +0200

    Reliably log user activity in a way that satisfies auditors

    Messages {
      name = Standard
      append = /tmp/bacula.log = all

      # To send the events into a log and in the catalog
      append = /tmp/audit.log = events, !events.bweb
      catalog = all, events
    }

    Users can create custom events with a console command:

    .events

    They can list events in the catalog with

    * list events
    +---------------------+------------+-----------+--------------------------------+
    | time                | type       | source    | events                         |
    +---------------------+------------+-----------+--------------------------------+
    | 2020-04-24 17:04:07 | daemon     | *Daemon*  | Director startup               |
    | 2020-04-24 17:04:12 | connection | *Console* | Connection from 127.0.0.1:8101 |
    | 2020-04-24 17:04:20 | command    | *Console* | purge jobid=1                  |
    +---------------------+------------+-----------+--------------------------------+

    The event format in the log is:

    24-Apr 17:04 Events: code=DC0001 from=zog8-dir ref=0x1fa5 type=daemon source=*Daemon* text=Director startup

    24-Apr 17:04 Events: code=DC0002 from=zog8-dir ref=0x7fb58000c4b8 type=connection source=*Console* text=Connection from 127.0.0.1:8101

    The reference (ref) is used to identify a console session, all activity
    from the same console will have the same reference.

    The source is the name of the restricted console, or *Console* if this
    is the default console.

    We have the following events:
     - cancel a job
     - delete volume
     - delete job
     - purge job
     - delete pool
     - delete client
     - daemon startup
     - daemon shutdown
     - console connection
     - console disconnection

    To add a new events:
    ua->send_events(type, format, arguments);

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Mar 3 11:48:33 2020 +0100

    Remove BEEF from FileMedia table

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Aug 11 21:20:22 2018 +0200

    Permit catalog to contain negative FileIndexes

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Feb 22 17:41:31 2018 +0100

    Fix #3508 About Counter catalog value not proprely updated after a reload

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Apr 5 18:55:10 2016 +0200

    Implement FileMedia feature and FO_OFFSETS for plugin

     - Allow plugins to use the FO_OFFSETS option
     - Add SQL support in cats
     - Add bvfs commands
     - Add FileMedia handling in the Storage Daemon
     - Add use FO_OFFSETS option in test plugin
     - Add new sql scripts to configure.in
     - Update catalog version to 1018

Author: Kern Sibbald <kern@sibbald.com>
Date:   Fri Apr 17 18:33:35 2015 +0200

    Refactor DB engine to be class based

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 26 13:57:34 2013 +0200

    Merge Filename table to File

4 years agoBEE Backport bacula/src/cats/sql_cmds.h
Eric Bollengier [Mon, 11 May 2020 15:13:18 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_cmds.h

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu May 16 10:40:49 2019 +0200

    Fix #5053 about BVFS commands not compatible with ACLs wildcards

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

4 years agoBEE Backport bacula/src/cats/sql_cmds.c
Eric Bollengier [Mon, 11 May 2020 15:13:13 +0000 (17:13 +0200)] 
BEE Backport bacula/src/cats/sql_cmds.c

This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Nov 12 15:29:50 2019 +0100

    Do not select volumes with MaximumVolumeRetention=0 in "prune expired" command

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu May 16 10:40:49 2019 +0200

    Fix #5053 about BVFS commands not compatible with ACLs wildcards

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 27 16:06:06 2018 +0100

    Allow to copy/migrate jobs with plugins

    Up to now, the unique Job name is used by plugins as a key
    in some cases (for example as a snapshot name).
    The plugin can use this value to compute the backup set.
    For example, snapshot-diff previous current

    When using Copy/Migration, the unique Job name associated with a job
    is updated with a new name, leading to some confusion on the plugin
    side.

    With this patch, we associate the original Job name with the
    Copy/Migration job record in the catalog, and we can send this value
    to the Client. If we copy a job that was migrated, the original job
    is kept from one job record to an other.

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Tue Feb 13 14:15:04 2018 +0100

    Add MaxPoolBytes support for SQL functions

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Jan 10 11:31:59 2018 +0100

    Fix #3451 about a segfault with the "prune expired" command with the SQLite backend

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Oct 11 09:51:46 2017 +0200

    Fix SQLite queries that select volumes for pruning

    Strangely, this query doesn't work as expected on SQLite 3.11.0, but it is ok on 2.8.17.

    sqlite> select (strftime('%s', '2017-10-11 10:04:43') + 300) <  strftime('%s', '2017-10-11 10:04:43');
    1

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Feb 20 16:04:57 2017 +0100

    Fix SQLite SQL queries with NOW()

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Sat Nov 23 09:34:22 2013 +0100

    Fix bvfs problem with MySQL reported by Alain

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Nov 1 16:02:55 2013 +0100

    Fix bvfs queries using delta files

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Sep 4 17:51:15 2013 +0200

    Fix bvfs query for MySQL

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Mon Aug 26 13:57:34 2013 +0200

    Merge Filename table to File