From: Eric Bollengier Date: Mon, 11 May 2020 15:18:26 +0000 (+0200) Subject: BEE Backport bacula/src/cats/update_sqlite3_tables.in X-Git-Tag: Release-11.3.2~1700 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=861ded0e58872c411264fefcde2391622973937d;p=thirdparty%2Fbacula.git 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 Date: Wed Apr 29 13:52:04 2020 +0200 Update SQL scripts for Events table. Catalog format 1022 Author: Alain Spineux 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 Date: Sat Aug 11 21:20:22 2018 +0200 Permit catalog to contain negative FileIndexes Author: Eric Bollengier 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 Date: Tue Feb 13 14:13:54 2018 +0100 Add Pool::MaxPoolBytes to the catalog. Catalog version is now 1020 Author: Eric Bollengier Date: Thu Jan 5 20:27:33 2017 +0100 Add CacheRetention to the Media table Author: Kern Sibbald Date: Mon Jan 2 13:32:50 2017 +0100 Fix bad definition of LastPartSize in update tables Author: Kern Sibbald Date: Tue Oct 11 09:48:34 2016 +0200 Add new Cloud part info to catalog - update database version to 1019 Author: Eric Bollengier 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 Date: Tue Feb 24 16:46:46 2015 +0100 Upgrade catalog version to 1017 Author: Eric Bollengier Date: Sun Nov 3 17:32:19 2013 +0100 Add missing FileTable column on JobHisto table Author: Eric Bollengier Date: Fri Sep 20 16:49:17 2013 +0200 Add FileTable attribute in Job table Author: Eric Bollengier Date: Thu Sep 19 16:28:34 2013 +0200 Add migration script for SQLite3 Author: Eric Bollengier 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 Date: Thu May 2 17:13:05 2013 +0200 Add Holes to catalog Author: Kern Sibbald Date: Tue Feb 5 12:37:33 2013 +0100 Add VolABytes to Media record + adapt Bacula code new DB version 1015 Author: Eric Bollengier Date: Tue Feb 28 17:04:26 2012 +0100 Add Incomplete status in make_xxx_tables and update_xxx_tables Author: Eric Bollengier Date: Thu Feb 23 11:39:53 2012 +0100 Add update procedure from 5.2 Author: Eric Bollengier Date: Wed Feb 15 15:27:23 2012 +0100 Update update_xxx_tables scripts for version 1014 Author: Eric Bollengier Date: Mon Jan 30 13:19:07 2012 +0100 Update update_xxx_tables to convert 12,13 to 14 --- diff --git a/bacula/src/cats/update_sqlite3_tables.in b/bacula/src/cats/update_sqlite3_tables.in index 5b1f6e8a0c..0949c59d9d 100644 --- a/bacula/src/cats/update_sqlite3_tables.in +++ b/bacula/src/cats/update_sqlite3_tables.in @@ -1,33 +1,34 @@ #!/bin/sh # -# Copyright (C) 2000-2017 Kern Sibbald +# Copyright (C) 2000-2020 Kern Sibbald # License: BSD 2-Clause; see file LICENSE-FOSS # -# Shell script to update SQLite tables from Bacula Community version -# 5.0.x, 5.2.x, 7.0.x, 7.2.x, 7.4.x +# Shell script to update SQLite3 tables from Bacula Enterprise version from 4.0.x to 12.4.x # echo " " -echo "This script will update a Bacula SQLite database from version 12-15 to 16" -echo " " -echo "Depending on the current version of your catalog," -echo "you may have to run this script multiple times" +echo "This script will update a Bacula SQLite3 database from version 12-14,1021 to 1022" +echo " which is needed to convert from Bacula Enterprise version 4.0.x to 12.4.x" +echo " or Bacula Community version 5.0.x, 5.2.x, 6.0.x to 10.0.x" echo " " bindir=@SQLITE_BINDIR@ PATH="$bindir:$PATH" cd @working_dir@ db_name=@db_name@ + DBVERSION=`sqlite3 ${db_name}.db <