dle_t *dle;
int level;
GSList *errlist;
- level_t *alevel;
+ am_level_t *alevel;
if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
printf("selfcheck-%s\n", VERSION);
if (ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
goto err; /* bad level */
}
- alevel = g_new0(level_t, 1);
+ alevel = g_new0(am_level_t, 1);
alevel->level = level;
dle->levellist = g_slist_append(dle->levellist, alevel);
skip_integer(s, ch);
check_file(COMPRESS_PATH, X_OK);
if (need_dump || need_xfsdump ) {
- if (check_file_exist("/etc/dumpdates")) {
- check_file("/etc/dumpdates",
+ if (check_file_exist("/var/lib/dumpdates")) {
+ check_file("/var/lib/dumpdates",
#ifdef USE_RUNDUMP
F_OK
#else
} else {
#ifndef USE_RUNDUMP
if (access("/etc", R_OK|W_OK) == -1) {
- g_printf(_("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n"), strerror(errno));
+ g_printf(_("ERROR [dump will not be able to create the /var/lib/dumpdates file: %s]\n"), strerror(errno));
}
#endif
}
}
if (need_vdump) {
- if (check_file_exist("/etc/vdumpdates")) {
- check_file("/etc/vdumpdates", F_OK);
+ if (check_file_exist("/var/lib/vdumpdates")) {
+ check_file("/var/lib/vdumpdates", F_OK);
}
}
check_space(AMANDA_DBGDIR, (off_t)64); /* for amandad i/o */
#endif
+ check_space("/var/lib", (off_t)64); /* for /var/lib/dumpdates writing */
check_space("/etc", (off_t)64); /* for /etc/dumpdates writing */
}
}
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved.
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
#ifdef HAVE_LIBCURL
#include <curl/curl.h>
- #endif
+
+ #ifdef LIBCURL_USE_OPENSSL
+ #include <openssl/crypto.h>
+ static GMutex **openssl_mutex_array;
+ static void openssl_lock_callback(int mode, int type, const char *file, int line)
+ {
+ (void)file;
+ (void)line;
+ if (mode & CRYPTO_LOCK) {
+ g_mutex_lock(openssl_mutex_array[type]);
+ }
+ else {
+ g_mutex_unlock(openssl_mutex_array[type]);
+ }
+ }
+
+ static void
+ init_ssl(void)
+ {
+ int i;
+
+ openssl_mutex_array = g_new0(GMutex *, CRYPTO_num_locks());
+
+ for (i=0; i<CRYPTO_num_locks(); i++) {
+ openssl_mutex_array[i] = g_mutex_new();
+ }
+ CRYPTO_set_locking_callback(openssl_lock_callback);
+
+ }
+
+ #else /* LIBCURL_USE_OPENSSL */
+ #if defined LIBCURL_USE_GNUTLS
+
+ #include <gcrypt.h>
+ #include <errno.h>
+
+ GCRY_THREAD_OPTION_PTHREAD_IMPL;
+ static void
+ init_ssl(void)
+ {
+ gcry_control(GCRYCTL_SET_THREAD_CBS);
+ }
+
+ #else /* LIBCURL_USE_GNUTLS */
+
+ static void
+ init_ssl(void)
+ {
+ }
+ #endif /* LIBCURL_USE_GNUTLS */
+ #endif /* LIBCURL_USE_OPENSSL */
+
+ #else /* HAVE_LIBCURL */
+ static void
+ init_ssl(void)
+ {
+ }
+ #endif /* HAVE_LIBCURL */
void
glib_init(void) {
if (did_glib_init) return;
did_glib_init = TRUE;
- /* set up libcurl (this must happen before threading
- * is initialized) */
+ /* set up libcurl */
#ifdef HAVE_LIBCURL
+ # ifdef G_THREADS_ENABLED
+ # if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 31))
+ g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */
+ # endif
+ # endif
g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
#endif
/* Initialize glib's type system. On glib >= 2.24, this will initialize
* threads, so it must be done after curl is initialized. */
g_type_init();
+
+ /* And set up glib's threads */
+ #if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+ #endif
+
+ /* initialize ssl */
+ init_ssl();
+
}
typedef enum {
--- /dev/null
- VTAPES-access.diff
+dumpdates-path
+glib-2.32.patch
+kfreebsd-ftbfs.diff
.\" Title: amanda.conf
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
- .\" Date: 02/21/2012
+ .\" Date: 07/25/2012
.\" Manual: File formats and conventions
- .\" Source: Amanda 3.3.1
+ .\" Source: Amanda 3.3.2
.\" Language: English
.\"
- .TH "AMANDA\&.CONF" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions"
+ .TH "AMANDA\&.CONF" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.PP
\fBcolumnspec\fR \fIstring\fR
.RS 4
- default: "HostName=0:12:12,Disk=1:11:11,Level=1:1:1,OrigKB=1:\-7:0,OutKB=1:\-7:0,Compress=1:\-6:1,DumpTime=1:\-7:7,Dumprate=1:\-6:1,TapeTime=1:\-6:6,TapeRate=1:\-6:1"
+ default: "HostName=0:\-12:12,Disk=1:\-11:11,Level=1:\-1:1,OrigKB=1:\-7:0,OutKB=1:\-7:0,Compress=1:\-6:1,DumpTime=1:\-7:7,Dumprate=1:\-6:1,TapeTime=1:\-6:6,TapeRate=1:\-6:1"
.sp
Defines the width of columns
\fBamreport\fR
.sp
Recovery limits can be refined on a per\-DLE basis using the dumptype parameter of the same name\&. Note that the default value will apply to any dumpfiles for disks which no longer appear in the disklist; thus leaving the global parameter at its default value but setting it for all DLEs is not sufficient to maintain secure backups\&.
.RE
+ .PP
+ \fBtmpdir\fR \fIstring\fR
+ .RS 4
+ Default: none (system default)\&. Set it to a directory with lots of free space if sort in amindexd fail with \*(AqNo space left on device\*(Aq\&.
+ .RE
.SH "HOLDINGDISK SECTION"
.PP
The
\fI10000\fR\&. The maximum number of day for a promotion, set it 0 if you don\*(Aqt want promotion, set it to 1 or 2 if your disks get overpromoted\&.
.RE
.PP
+ \fBmax\-warnings\fR \fIint\fR
+ .RS 4
+ Default:
+ \fI20\fR\&. The maximum number of error lines in the report for a dle\&. A value of \*(Aq0\*(Aq means unlimited\&. This is useful to reduce the size of the log file and the size of the report\&. All errors are put in separate files if a dle have more errors\&.
+ .RE
+ .PP
\fBpriority\fR [ \fBlow\fR | \fBmedium\fR | \fBhigh\fR ]
.RS 4
Default:
\fBrecord\fR \fIboolean\fR
.RS 4
Default:
-\fByes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
-/etc/dumpdates
+\fIyes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
+/var/lib/dumpdates
for DUMP or
/usr/local/var/amanda/gnutar\-lists
for GNUTAR) of time stamps\&. This is normally enabled for daily backups and turned off for periodic archival runs\&.
\fBplugin\fR \fIstring\fR
.RS 4
No default\&. Must be set to the name of the taperscan module\&. See
- <man></man>
+ \fBamanda-taperscan\fR(7)
for a list of defined taperscan modules\&.
.RE
.PP
.\" Title: disklist
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
- .\" Date: 02/21/2012
+ .\" Date: 07/25/2012
.\" Manual: File formats and conventions
- .\" Source: Amanda 3.3.1
+ .\" Source: Amanda 3.3.2
.\" Language: English
.\"
- .TH "DISKLIST" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions"
+ .TH "DISKLIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.PP
The
\fIdisklist\fR
- file determines which disks will be backed up by Amanda\&. The file usually contains one line per disk:
+ file determines which disks will be backed up by Amanda\&. The file contains
+ \fBincludefile\fR
+ directive or disklist entry (\fBDLE\fR)\&.
+ .PP
+ \fBincludefile\fR \fIstring\fR
+ .RS 4
+ Default:
+ \fIno default\fR\&. The name of a disklist file to include within the current file\&. Useful for sharing disklist among several configurations\&. Relative pathnames are relative to the configuration directory\&.
+ .RE
+ .PP
+ A
+ \fBDLE\fR
+ usually contains one line per disk:
.nf
\fIhostname diskname\fR [\fIdiskdevice\fR] \fIdumptype\fR [\fIspindle\fR [\fIinterface\fR] ]
.fi
\fBamanda\&.conf\fR
file\&.
\fIDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in
-/etc/dumpdates, the disk\*(Aqs relative priority, etc\&.
+/var/lib/dumpdates, the disk\*(Aqs relative priority, etc\&.
.RE
.PP
\fIspindle\fR
<varlistentry>
<term><amkeyword>columnspec</amkeyword> <amtype>string</amtype></term>
<listitem>
- <para> default: "HostName=0:12:12,Disk=1:11:11,Level=1:1:1,OrigKB=1:-7:0,OutKB=1:-7:0,Compress=1:-6:1,DumpTime=1:-7:7,Dumprate=1:-6:1,TapeTime=1:-6:6,TapeRate=1:-6:1"</para>
+ <para> default: "HostName=0:-12:12,Disk=1:-11:11,Level=1:-1:1,OrigKB=1:-7:0,OutKB=1:-7:0,Compress=1:-6:1,DumpTime=1:-7:7,Dumprate=1:-6:1,TapeTime=1:-6:6,TapeRate=1:-6:1"</para>
<para>Defines the width of columns <emphasis remap='B'>amreport</emphasis>
should use.
<emphasis remap='I'>String</emphasis>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><amkeyword>tmpdir</amkeyword> <amtype>string</amtype></term>
+ <listitem>
+ <para>Default: none (system default). Set it to a directory with lots of free
+ space if sort in amindexd fail with 'No space left on device'.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<amdefault>10000</amdefault>.
The maximum number of day for a promotion, set it 0 if you don't want
promotion, set it to 1 or 2 if your disks get overpromoted.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>max-warnings</amkeyword> <amtype>int</amtype></term>
+ <listitem>
+ <para>Default:
+ <amdefault>20</amdefault>.
+ The maximum number of error lines in the report for a dle. A value of '0'
+ means unlimited. This is useful to reduce the size of the log file and the
+ size of the report. All errors are put in separate files if a dle have more
+ errors.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><amkeyword>record</amkeyword> <amtype>boolean</amtype></term>
<listitem>
<para>Default:
-<amkeyword>yes</amkeyword>.
-Whether to ask the backup program to update its database (e.g. <filename>/etc/dumpdates</filename>
+<emphasis remap='I'>yes</emphasis>.
+Whether to ask the backup program to update its database (e.g. <filename>/var/lib/dumpdates</filename>
for DUMP or <filename>/usr/local/var/amanda/gnutar-lists</filename> for GNUTAR) of time stamps.
This is normally enabled for daily backups and turned off for periodic archival runs.</para>
</listitem>
<varlistentry>
<term><amkeyword>plugin</amkeyword> <amtype>string</amtype></term>
<listitem>
- <para>No default. Must be set to the name of the taperscan module. See <man name="amanda-taperscan" vol="7" /> for a list of defined taperscan modules.</para>
+ <para>No default. Must be set to the name of the taperscan module. See <manref name="amanda-taperscan" vol="7" /> for a list of defined taperscan modules.</para>
</listitem>
</varlistentry>
<varlistentry>
<refsect1><title>DESCRIPTION</title>
<para>The
<emphasis remap='I'>disklist</emphasis>
- file determines which disks will be backed up by Amanda.
- The file usually contains one line per disk:</para>
+ file determines which disks will be backed up by Amanda. The file contains
+ <amkeyword>includefile</amkeyword> directive or disklist entry
+ (<amkeyword>DLE</amkeyword>).</para>
+
+ <variablelist remap='TP'>
+ <varlistentry>
+ <term><amkeyword>includefile</amkeyword> <amtype>string</amtype></term>
+ <listitem>
+ <para>Default:
+ <amdefault>no default</amdefault>.
+ The name of a disklist file to include within the current file.
+ Useful for sharing disklist among several configurations.
+ Relative pathnames are relative to the configuration directory.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>A <amkeyword>DLE</amkeyword> usually contains one line per disk:</para>
<programlisting>
<emphasis>hostname diskname</emphasis> [<emphasis>diskdevice</emphasis>] <emphasis>dumptype</emphasis> [<emphasis>spindle</emphasis> [<emphasis>interface</emphasis>] ]
specify backup related parameters,
such as whether to compress the backups,
whether to record backup results in
-<filename>/etc/dumpdates</filename>, the disk's relative priority, etc.</para>
+<filename>/var/lib/dumpdates</filename>, the disk's relative priority, etc.</para>
</listitem>
</varlistentry>
<varlistentry>
char *client_username; /* username to connect on the client */
char *client_port; /* port to connect on the client */
char *ssh_keys; /* ssh_key file to use */
- sl_t *exclude_file; /* file exclude spec */
- sl_t *exclude_list; /* exclude list */
- sl_t *include_file; /* file include spec */
- sl_t *include_list; /* include list */
+ am_sl_t *exclude_file; /* file exclude spec */
+ am_sl_t *exclude_list; /* exclude list */
+ am_sl_t *include_file; /* file include spec */
+ am_sl_t *include_list; /* include list */
int exclude_optional; /* exclude list are optional */
int include_optional; /* include list are optional */
int priority; /* priority of disk */
int allow_split;
+ int max_warnings;
off_t splitsize;
off_t tape_splitsize; /* size of dumpfile chunks on tape */
char *split_diskbuffer; /* place where we can buffer PORT-WRITE dumps other than RAM */
char *clnt_decrypt_opt; /* client-side decryption option parameter to use */
double comprate[2]; /* default compression rates */
/* flag options */
- int record; /* record dump in /etc/dumpdates ? */
+ int record; /* record dump in /var/lib/dumpdates ? */
int skip_incr; /* incs done externally ? */
int skip_full; /* fulls done externally ? */
int to_holdingdisk; /* use holding disk ? */