summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5430e18)
* Prepare for GnuPG.
* Support no compression (may be useful with gnupg, later).
.. HTML version generated with rst2html -t README > README.html
.. HTML version generated with rst2html -t README > README.html
+.. |date| date:: %b %e, %Y
+
:Author: Amand Tihon
:Contact: <amand.tihon@alrj.org>
:Author: Amand Tihon
:Contact: <amand.tihon@alrj.org>
-:Version: 1.1
-:Date: Jan 5th, 2008
+:Version: 1.2
+:Date: |date|
:Copyright: GNU GPL, see copyright file.
.. sectnum::
:Copyright: GNU GPL, see copyright file.
.. sectnum::
COMPRESS
This directive allows to specify the compression method to apply to the
COMPRESS
This directive allows to specify the compression method to apply to the
- archives. Possible values are "gz", "bz2" and "lzma". **Warning** : lzma may
- not be available with older versions of GNU tar.
+ archives. Possible values are "none", "gz", "bz2" and "lzma".
+ **Warning** : lzma may not be available with older versions of GNU tar.
TAR_OPTS
Additionnal options that you may want to pass to tar. A typical value could
TAR_OPTS
Additionnal options that you may want to pass to tar. A typical value could
Set the size of the snapshot volume. The same suffix than for lvcreate(8)
are available.
Set the size of the snapshot volume. The same suffix than for lvcreate(8)
are available.
+USE_GPG
+ When set to "yes", Brioche will encrypt the archives with GnuPG.
+ See the `Encryption with GnuPG`_ section below for a detailed explanation on
+ how to use GnuPG with Brioche.
+
+GPG_KEY
+ The identifier of the public GnuPG key to use when encrypting the archives.
+ This is the key that will be needed in case of restore.
+
+GPG_PASSPHRASE
+ The passphrase for the GnuPG private key used to encrypt the archives.
+
USE_FTP
If set to "yes", Brioche will upload the backups on an FTP server.
See the `Using FTP`_ section for more information about this feature.
USE_FTP
If set to "yes", Brioche will upload the backups on an FTP server.
See the `Using FTP`_ section for more information about this feature.
+--------------------------------------------------------------------------+
+--------------------------------------------------------------------------+
+Encryption with GnuPG
+---------------------
+
+
weekly full backup on Sunday, with differential during the weekdays: ::
# Daily incremental backup
weekly full backup on Sunday, with differential during the weekdays: ::
# Daily incremental backup
- 30 3 * * 1-6 /usr/local/bin/brioche > /var/log/backup.`date "+%a"`.log 2>&1
+ 30 3 * * 1-6 /usr/local/bin/brioche > /var/log/backup.`dow`.log 2>&1
# Weekly full backup on Sunday
# Weekly full backup on Sunday
- 30 3 * * 0 /usr/local/bin/brioche -f > /var/log/backup.`date "+%a"`.log 2>&1
+ 30 3 * * 0 /usr/local/bin/brioche -f > /var/log/backup.`dow`.log 2>&1
The output of the script will be saved in /var/log/backup.DOW.log with DOW
being the abbreviated day of the week (see man date(1) for the format).
The output of the script will be saved in /var/log/backup.DOW.log with DOW
being the abbreviated day of the week (see man date(1) for the format).
+The ``dow`` bash script is provided alongside Brioche.
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Brioche Backup</title>
<meta name="author" content="Amand Tihon" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Brioche Backup</title>
<meta name="author" content="Amand Tihon" />
-<meta name="date" content="Jan 5th, 2008" />
+<meta name="date" content="Jan 9, 2009" />
<meta name="copyright" content="GNU GPL, see copyright file." />
<style type="text/css">
<meta name="copyright" content="GNU GPL, see copyright file." />
<style type="text/css">
<tr><th class="docinfo-name">Contact:</th>
<td><<a class="reference external" href="mailto:amand.tihon@alrj.org">amand.tihon@alrj.org</a>></td></tr>
<tr><th class="docinfo-name">Version:</th>
<tr><th class="docinfo-name">Contact:</th>
<td><<a class="reference external" href="mailto:amand.tihon@alrj.org">amand.tihon@alrj.org</a>></td></tr>
<tr><th class="docinfo-name">Version:</th>
<tr><th class="docinfo-name">Date:</th>
<tr><th class="docinfo-name">Date:</th>
-<td>Jan 5th, 2008</td></tr>
+<td>Jan 9, 2009</td></tr>
<tr><th class="docinfo-name">Copyright:</th>
<td>GNU GPL, see copyright file.</td></tr>
</tbody>
<tr><th class="docinfo-name">Copyright:</th>
<td>GNU GPL, see copyright file.</td></tr>
</tbody>
<li><a class="reference internal" href="#using-brioche" id="id7">6 Using Brioche</a><ul class="auto-toc">
<li><a class="reference internal" href="#configuration" id="id8">6.1 Configuration</a></li>
<li><a class="reference internal" href="#defining-backups" id="id9">6.2 Defining backups</a></li>
<li><a class="reference internal" href="#using-brioche" id="id7">6 Using Brioche</a><ul class="auto-toc">
<li><a class="reference internal" href="#configuration" id="id8">6.1 Configuration</a></li>
<li><a class="reference internal" href="#defining-backups" id="id9">6.2 Defining backups</a></li>
-<li><a class="reference internal" href="#using-ftp" id="id10">6.3 Using FTP</a></li>
-<li><a class="reference internal" href="#running-brioche" id="id11">6.4 Running Brioche</a></li>
+<li><a class="reference internal" href="#encryption-with-gnupg" id="id10">6.3 Encryption with GnuPG</a></li>
+<li><a class="reference internal" href="#using-ftp" id="id11">6.4 Using FTP</a></li>
+<li><a class="reference internal" href="#running-brioche" id="id12">6.5 Running Brioche</a></li>
-<li><a class="reference internal" href="#bug-reporting" id="id12">7 Bug reporting</a></li>
-<li><a class="reference internal" href="#references" id="id13">8 References</a></li>
+<li><a class="reference internal" href="#bug-reporting" id="id13">7 Bug reporting</a></li>
+<li><a class="reference internal" href="#references" id="id14">8 References</a></li>
</ul>
</div>
<div class="section" id="abstract">
</ul>
</div>
<div class="section" id="abstract">
beyond the given threshold. The value must be an integer.</dd>
<dt>COMPRESS</dt>
<dd>This directive allows to specify the compression method to apply to the
beyond the given threshold. The value must be an integer.</dd>
<dt>COMPRESS</dt>
<dd>This directive allows to specify the compression method to apply to the
-archives. Possible values are "gz", "bz2" and "lzma". <strong>Warning</strong> : lzma may
-not be available with older versions of GNU tar.</dd>
+archives. Possible values are "none", "gz", "bz2" and "lzma".
+<strong>Warning</strong> : lzma may not be available with older versions of GNU tar.</dd>
<dt>TAR_OPTS</dt>
<dd>Additionnal options that you may want to pass to tar. A typical value could
be <tt class="docutils literal"><span class="pre">"--one-file-system</span> <span class="pre">-S"</span></tt>. The first option will skip all other
<dt>TAR_OPTS</dt>
<dd>Additionnal options that you may want to pass to tar. A typical value could
be <tt class="docutils literal"><span class="pre">"--one-file-system</span> <span class="pre">-S"</span></tt>. The first option will skip all other
<dt>SNAPSHOT_SIZE</dt>
<dd>Set the size of the snapshot volume. The same suffix than for lvcreate(8)
are available.</dd>
<dt>SNAPSHOT_SIZE</dt>
<dd>Set the size of the snapshot volume. The same suffix than for lvcreate(8)
are available.</dd>
+<dt>USE_GPG</dt>
+<dd>When set to "yes", Brioche will encrypt the archives with GnuPG.
+See the <a class="reference internal" href="#encryption-with-gnupg">Encryption with GnuPG</a> section below for a detailed explanation on
+how to use GnuPG with Brioche.</dd>
+<dt>GPG_KEY</dt>
+<dd>The identifier of the public GnuPG key to use when encrypting the archives.
+This is the key that will be needed in case of restore.</dd>
+<dt>GPG_PASSPHRASE</dt>
+<dd>The passphrase for the GnuPG private key used to encrypt the archives.</dd>
<dt>USE_FTP</dt>
<dd>If set to "yes", Brioche will upload the backups on an FTP server.
See the <a class="reference internal" href="#using-ftp">Using FTP</a> section for more information about this feature.</dd>
<dt>USE_FTP</dt>
<dd>If set to "yes", Brioche will upload the backups on an FTP server.
See the <a class="reference internal" href="#using-ftp">Using FTP</a> section for more information about this feature.</dd>
+<div class="section" id="encryption-with-gnupg">
+<h2>6.3 Encryption with GnuPG</h2>
+</div>
<div class="section" id="using-ftp">
<div class="section" id="using-ftp">
-<h2>6.3 Using FTP</h2>
+<h2>6.4 Using FTP</h2>
<p>With the help of lftp, Brioche is able to store an history of backups on an FTP
server. This is mainly usefull when no other distant repository is available.
If possible, consider using an CIFS, NFS, sshfs or any other kind of remote
<p>With the help of lftp, Brioche is able to store an history of backups on an FTP
server. This is mainly usefull when no other distant repository is available.
If possible, consider using an CIFS, NFS, sshfs or any other kind of remote
</ul>
</div>
<div class="section" id="running-brioche">
</ul>
</div>
<div class="section" id="running-brioche">
-<h2>6.4 Running Brioche</h2>
+<h2>6.5 Running Brioche</h2>
<p>Brioche understands the following arguments:</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<p>Brioche understands the following arguments:</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
weekly full backup on Sunday, with differential during the weekdays:</p>
<pre class="literal-block">
# Daily incremental backup
weekly full backup on Sunday, with differential during the weekdays:</p>
<pre class="literal-block">
# Daily incremental backup
-30 3 * * 1-6 /usr/local/bin/brioche > /var/log/backup.`date "+%a"`.log 2>&1
+30 3 * * 1-6 /usr/local/bin/brioche > /var/log/backup.`dow`.log 2>&1
# Weekly full backup on Sunday
# Weekly full backup on Sunday
-30 3 * * 0 /usr/local/bin/brioche -f > /var/log/backup.`date "+%a"`.log 2>&1
+30 3 * * 0 /usr/local/bin/brioche -f > /var/log/backup.`dow`.log 2>&1
</pre>
<p>The output of the script will be saved in /var/log/backup.DOW.log with DOW
</pre>
<p>The output of the script will be saved in /var/log/backup.DOW.log with DOW
-being the abbreviated day of the week (see man date(1) for the format).</p>
+being the abbreviated day of the week (see man date(1) for the format).
+The <tt class="docutils literal"><span class="pre">dow</span></tt> bash script is provided alongside Brioche.</p>
</div>
</div>
<div class="section" id="bug-reporting">
</div>
</div>
<div class="section" id="bug-reporting">
</div>
<div class="footer">
<hr class="footer" />
</div>
<div class="footer">
<hr class="footer" />
-Generated on: 2009-01-06 15:56 UTC.
+Generated on: 2009-01-09 14:26 UTC.
* Implement hooks, in various parts of the script, that would allow to run
external commands (for instance, to freeze a database just before making a
snapshot).
* Implement hooks, in various parts of the script, that would allow to run
external commands (for instance, to freeze a database just before making a
snapshot).
+* Support GnuPG to encrypt the files
lzma)
COMPRESS_OPT="--lzma"
;;
lzma)
COMPRESS_OPT="--lzma"
;;
+ none)
+ COMPRESS_OPT=""
+ COMPRESS=""
+ ;;
*)
summary "Unknown compression method: ${COMPRESS}. Falling back to gzip."
COMPRESS="gz"
*)
summary "Unknown compression method: ${COMPRESS}. Falling back to gzip."
COMPRESS="gz"
USAGE_WARN="80"
# COMPRESS: What kind of compression should tar use.
USAGE_WARN="80"
# COMPRESS: What kind of compression should tar use.
-# Can be "gz", "bz2" or "lzma". Make sure your version of tar understands it.
+# Can be "none", "gz", "bz2" or "lzma". Make sure your version of tar
+# understands lzma if you want to use it.
COMPRESS="gz"
# TAR_OPTS: Additionnal options to the tar invocation.
COMPRESS="gz"
# TAR_OPTS: Additionnal options to the tar invocation.
# automatically, rendering the backup unusable.
SNAPSHOT_SIZE="5G"
# automatically, rendering the backup unusable.
SNAPSHOT_SIZE="5G"
+# USE_GPG: Encrypt all the tar archives with GnuPG
+USE_GPG="no"
+
+# GPG_KEY: The *target* GnuPG public key to use
+GPG_KEY="12345678"
+
+# GPG_PASSPHRASE: The passphrase for the backup private key
+GPG_PASSPHRASE="This is the backup passphrase"
+
# USE_FTP: Mirror the local backup directory on a remote FTP
USE_FTP="yes"
# USE_FTP: Mirror the local backup directory on a remote FTP
USE_FTP="yes"
+brioche 1.2
+ [ Amand Tihon]
+
+
brioche 1.1
[ Amand Tihon ]
brioche 1.1
[ Amand Tihon ]
- Some cosmetic changes.
- Renamed briochetab to briochetab.example.
- Some cosmetic changes.
- Renamed briochetab to briochetab.example.
- -- Amand Tihon <amand.tihon@alrj.org> Mon, 6 Jan 2008 17:00:00 +0100
+ -- Amand Tihon <amand.tihon@alrj.org> Tue, 6 Jan 2008 17:00:00 +0100
--- /dev/null
+#! /bin/bash
+
+# This script simply prints the abbreviated weekday name, using the C locale
+# and without line feed.
+#
+# Written by Amand Tihon <amand.tihon@alrj.org> for the Brioche backup script.
+# This script is Public Domain.
+#
+# A possible use is to generate daily logfiles names, like with
+# ... > /var/log/something.`dow`.log
+#
+# Note that if you intend to use it like this from your crontab, it should be
+# placed in a directory present in the limited PATH set by cron, like /usr/bin.
+
+export LC_ALL=C
+echo -n `date "+%a"`