From: Kern Sibbald Date: Wed, 28 Jul 2004 09:42:50 +0000 (+0000) Subject: Update/enhance copyright/license + add .backups for Nicolas X-Git-Tag: Release-1.35.1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac3eb25d5bf2629a83623aebd4c1f095f2eb50c9;p=thirdparty%2Fbacula.git Update/enhance copyright/license + add .backups for Nicolas git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1495 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/COPYING b/bacula/COPYING index 5087530b0..c910dbd8e 100644 --- a/bacula/COPYING +++ b/bacula/COPYING @@ -1,17 +1,19 @@ /* - Copyright (C) 2000, 2001 Kern Sibbald and John Walker + Copyright (C) 2000-2004 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/bacula/README b/bacula/README index a360ddd2d..c87326f89 100644 --- a/bacula/README +++ b/bacula/README @@ -92,16 +92,29 @@ FreeBSD users, pay special attention to the Device configuration parameters needed to deal with FreeBSD tape drivers. License: -For the most part, Bacula is licensed under GPL version 2 or greater. -Bacula may be linked with any libraries permitted under the GPL, or -with any non-GPLed libraries, including OpenSSL, that are required for -its proper functioning, providing the source code of those non-GPLed -libraries is freely available. +For the most part, Bacula is licensed under the GPL version 2 or greater +with the following two additions: + +Linking: Bacula may be linked with any libraries permitted under +the GPL, or with any non-GPLed libraries, including OpenSSL, that +are required for its proper functioning, providing the source +code of those non-GPLed libraries is non-proprietary and freely available. + +Termination for Patent Action: In addition to the termination +clause specified in the GPL, this license shall terminate +automatically and you may no longer exercise any of the rights +granted to you by this license as of the date you commence an +action, including a cross-claim or counterclaim, against any +licensor of GPL software alleging that the software infringes a +copyright, an intellectual property right, or a patent. +===================================== -In addition to GPL, there are also parts of Bacula that are licensed -under LGPL so that they may be used in proprietary code to interface -with Bacula, and there are parts that are in the public domain. +In addition to the GPL, there are parts of Bacula that are licensed +under the LGPL so that they may be used in proprietary code to interface +with Bacula. + +Finally there are parts of Bacula that are in the public domain. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index 821e49736..a230136e9 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -102,6 +102,7 @@ static int sleepcmd(FILE *input, BSOCK *UA_sock); static void usage() { fprintf(stderr, _( +"Copyright (C) 2000-2004 Kern Sibbald and John Walker\n" "\nVersion: " VERSION " (" BDATE ") %s %s %s\n\n" "Usage: bconsole [-s] [-c config_file] [-d debug_level]\n" " -c set configuration file to file\n" diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index a7afb0f5b..3865ed058 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -73,6 +73,7 @@ extern URES res_all; static void usage() { fprintf(stderr, _( +"Copyright (C) 2000-2004 Kern Sibbald and John Walker\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: dird [-f -s] [-c config_file] [-d debug_level] [config_file]\n" " -c set configuration file to file\n" diff --git a/bacula/src/dird/query.sql b/bacula/src/dird/query.sql index 29787b9c4..e763d9d89 100644 --- a/bacula/src/dird/query.sql +++ b/bacula/src/dird/query.sql @@ -58,7 +58,8 @@ SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobByte # 6 :List all backups for a Client *Enter Client Name: -SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobBytes,VolumeName +SELECT DISTINCT Job.JobId as JobId,Client.Name as Client,Level,StartTime, + JobFiles,JobBytes,VolumeName FROM Client,Job,JobMedia,Media WHERE Client.Name='%1' AND Client.ClientId=Job.ClientId diff --git a/bacula/src/dird/sql_cmds.c b/bacula/src/dird/sql_cmds.c index fa983d374..8c79737cd 100644 --- a/bacula/src/dird/sql_cmds.c +++ b/bacula/src/dird/sql_cmds.c @@ -33,6 +33,18 @@ /* For ua_cmds.c */ const char *list_pool = "SELECT * FROM Pool WHERE PoolId=%u"; +/* For ua_dotcmds.c */ +const char *client_backups = +"SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime," +"JobFiles,JobBytes,VolumeName" +" FROM Client,Job,JobMedia,Media" +" WHERE Client.Name='%s'" +" AND Client.ClientId=Job.ClientId" +" AND JobStatus='T'" +" AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId" +" ORDER BY Job.StartTime"; + + /* ====== ua_prune.c */ const char *cnt_File = "SELECT count(*) FROM File WHERE JobId=%u"; diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index c6cc6120a..c9255d659 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -39,6 +39,7 @@ extern int r_first; extern int r_last; extern struct s_res resources[]; extern char my_name[]; +extern const char *client_backups; /* Imported functions */ extern int qmessagescmd(UAContext *ua, const char *cmd); @@ -54,6 +55,7 @@ static int poolscmd(UAContext *ua, const char *cmd); static int storagecmd(UAContext *ua, const char *cmd); static int defaultscmd(UAContext *ua, const char *cmd); static int typescmd(UAContext *ua, const char *cmd); +static int backupscmd(UAContext *ua, const char *cmd); static int levelscmd(UAContext *ua, const char *cmd); struct cmdstruct { const char *key; int (*func)(UAContext *ua, const char *cmd); const char *help; }; @@ -65,6 +67,7 @@ static struct cmdstruct commands[] = { { N_(".msgs"), msgscmd, NULL}, { N_(".pools"), poolscmd, NULL}, { N_(".types"), typescmd, NULL}, + { N_(".backups"), backupscmd, NULL}, { N_(".levels"), levelscmd, NULL}, { N_(".storage"), storagecmd, NULL}, { N_(".defaults"), defaultscmd, NULL}, @@ -199,6 +202,31 @@ static int typescmd(UAContext *ua, const char *cmd) return 1; } +static int client_backups_handler(void *ctx, int num_field, char **row) +{ + UAContext *ua = (UAContext *)ctx; + bsendmsg(ua, "| %s | %s | %s | %s | %s | %s | %s |\n", + row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7]); + return 0; +} + +static int backupscmd(UAContext *ua, const char *cmd) +{ + if (!open_db(ua)) { + return 1; + } + if (ua->argc == 2 && strcmp(ua->argk[1], "client") != 0) { + return 1; + } + Mmsg(&ua->cmd, client_backups, ua->argv[1]); + if (!db_sql_query(ua->db, ua->cmd, client_backups_handler, (void *)ua)) { + bsendmsg(ua, _("Query failed: %s. ERR=%s\n"), ua->cmd, db_strerror(ua->db)); + return 1; + } + return 1; +} + + static int levelscmd(UAContext *ua, const char *cmd) { bsendmsg(ua, "Incremental\n"); diff --git a/bacula/src/filed/filed.c b/bacula/src/filed/filed.c index 3d8e788d2..85a5a02fa 100644 --- a/bacula/src/filed/filed.c +++ b/bacula/src/filed/filed.c @@ -63,6 +63,7 @@ static pthread_t server_tid; static void usage() { fprintf(stderr, _( +"Copyright (C) 2000-2004 Kern Sibbald and John Walker\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: bacula-fd [-f -s] [-c config_file] [-d debug_level]\n" " -c use as configuration file\n" diff --git a/bacula/src/gnome2-console/console.c b/bacula/src/gnome2-console/console.c index 391fcbb51..c4c6fa809 100644 --- a/bacula/src/gnome2-console/console.c +++ b/bacula/src/gnome2-console/console.c @@ -8,7 +8,7 @@ */ /* - Copyright (C) 2002 Kern Sibbald and John Walker + Copyright (C) 2002-2004 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -85,6 +85,7 @@ static guint initial; static void usage() { fprintf(stderr, _( +"Copyright (C) 2002-2004 Kern Sibbald and John Walker\n" "\nVersion: " VERSION " (" BDATE ") %s %s %s\n\n" "Usage: gnome-console [-s] [-c config_file] [-d debug_level] [config_file]\n" " -c set configuration file to file\n" diff --git a/bacula/src/stored/bcopy.c b/bacula/src/stored/bcopy.c index c212fe67f..d4a511198 100644 --- a/bacula/src/stored/bcopy.c +++ b/bacula/src/stored/bcopy.c @@ -54,6 +54,7 @@ bool forge_on = true; static void usage() { fprintf(stderr, _( +"Copyright (C) 2002-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: bcopy [-d debug_level] \n" " -b bootstrap specify a bootstrap file\n" diff --git a/bacula/src/stored/bextract.c b/bacula/src/stored/bextract.c index 0334f3f91..daf491715 100644 --- a/bacula/src/stored/bextract.c +++ b/bacula/src/stored/bextract.c @@ -70,6 +70,7 @@ bool forge_on = false; static void usage() { fprintf(stderr, +"Copyright (C) 2000-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: bextract \n" " -b specify a bootstrap file\n" diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index 34b879e1d..145c86079 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -65,6 +65,7 @@ static BSR *bsr = NULL; static void usage() { fprintf(stderr, +"Copyright (C) 2000-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: bls [-d debug_level] \n" " -b specify a bootstrap file\n" diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index fde90cac3..612016d1c 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -103,6 +103,7 @@ bool forge_on = false; static void usage() { fprintf(stderr, _( +"Copyright (C) 2001-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: bscan [ options ] \n" " -b bootstrap specify a bootstrap file\n" diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index ae8fb1274..5ac4c6a46 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -2489,6 +2489,7 @@ static void helpcmd() static void usage() { fprintf(stderr, _( +"Copyright (C) 2000-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: btape \n" " -b specify bootstrap file\n" diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index 957738336..21d4fff4b 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -63,6 +63,7 @@ static workq_t dird_workq; /* queue for processing connections */ static void usage() { fprintf(stderr, _( +"Copyright (C) 2000-2004 Kern Sibbald and John Walker.\n" "\nVersion: " VERSION " (" BDATE ")\n\n" "Usage: stored [options] [-c config_file] [config_file]\n" " -c use as configuration file\n" diff --git a/bacula/src/version.h b/bacula/src/version.h index 29d1678a8..72b21a236 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION #define VERSION "1.35.1" -#define BDATE "27 July 2004" -#define LSMDATE "27Jul04" +#define BDATE "28 July 2004" +#define LSMDATE "28Jul04" /* Debug flags */ #undef DEBUG