Your message dated Thu, 13 Mar 2014 21:20:42 +0000
with message-id <20140313212012.GA23191@holywood>
and subject line Re: Bug#731755: obnam: an example script for "obnam mount"
has caused the Debian Bug report #731755,
regarding obnam: an example script for "obnam mount"
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
731755: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731755
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: obnam
Version: 1.6.1-1
Severity: wishlist
I wish to have an example script for "obnam mount" shipped in
/usr/share/doc/obnam/examples to help users :-)
Considering this may be used for current and old obnam repositories, I
thought attached may be an good example script.
So far, it works for me.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.11-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages obnam depends on:
ii libc6 2.17-97
ii python 2.7.5-5
ii python-cliapp 1.20130808-1
ii python-fuse 2:0.2.1-8
ii python-larch 1.20131130-1
ii python-paramiko 1.10.1-1
ii python-tracing 0.6-2
ii python-ttystatus 0.23-1
obnam recommends no packages.
obnam suggests no packages.
-- no debconf information
#!/bin/sh
#
# script to mount all historical obnam repository data
#
# Syntax:
# obnam-mount [path/to/obnam-repo [/base/path]]
#
# path/to/obnam-repo : default "." ; where the obnam backup exists
# /base/path : default "/" ; skip this path when mounting
#
# Public domain: 2013-12-09 Osamu Aoki
#
DIR=${1:-.}
ROOT=${2:-/}
if ! dpkg -l python-fuse >/dev/null ; then
echo "Error: package \"python-fuse\" is missing. Please install." >&2
exit 1
fi
if [ ! -f $DIR/chunklist/metadata -o ! -f $DIR/chunksums/metadata -o \
! -f $DIR/clientlist/metadata -o ! -f $DIR/metadata/format -o \
! -d $DIR/chunks ]; then
echo "Error: Path \"$DIR\" is not a obnam repository." >&2
echo >&2
echo "Usage syntax:">&2
echo " ${0##*/} [path/to/obnam-repo [/base/path]]" >&2
exit 1
fi
echo "... found the obnam backup repository at: \"$DIR\"" >&2
echo >&2
if [ -d $DIR/mount -a -f $DIR/mount/.pid ]; then
echo "... updating the history data at: \"$DIR/mount\"" >&2
kill -HUP `cat $DIR/mount/.pid`
echo >&2
else
mkdir -p $DIR/mount
echo "... creating the history data at: \"$DIR/mount\"" >&2
echo >&2
fi
obnam mount $ROOT --repository=$DIR --to=$DIR/mount \
--viewmode=multiple --log=$DIR/mount.log
echo "ls -lt $DIR/mount"
ls -lt $DIR/mount
--- End Message ---
--- Begin Message ---
On Mon, Dec 09, 2013 at 10:24:35PM +0900, Osamu Aoki wrote:
> Package: obnam
> Version: 1.6.1-1
> Severity: wishlist
>
> I wish to have an example script for "obnam mount" shipped in
> /usr/share/doc/obnam/examples to help users :-)
>
> Considering this may be used for current and old obnam repositories, I
> thought attached may be an good example script.
>
> So far, it works for me.
Hi,
thank you for the script. Unfortunately, I'm not going to be including
it, though it will inspire me to do a related change.
The script checks for python-fuse being installed; this should be
unnecessary, since it is a dependency, and so is always installed.
It then checks that the argument it's been given is a real Obnam
repository. I now realise the Obnam error message for this is not very
clear; I will be fixing that, making it unnecessary for the script to
check for it explicitly.
The script creates a directory, called mount, inside the backup
repository. I'm not sure I like that: a future version of "obnam fsck"
may want to remove all un-known files and directories from the
repository, and that would break things for the mount point,
especially so if it is currently mounted.
The script then checks if there is a currently mounted FUSE filesystem
and kills it, before making a new one. This should be unnecessary:
just reading the .pid file at the root of the FUSE filesystem
refreshes the view of the repository.
What remains is, in my opinion, is perhaps not worth adding to the
package as an example. Sorry.
I very much want to reach a situation where wrapper scripts like this
are unnecessary. For GUI desktop sessions, I would like to have an
optional thing that automatically FUSE mounts your Obnam repository in
a suitable location, to make restoring as easy as opening your file
browser. That's not a solution for non-desktop use, of course.
--
http://www.cafepress.com/trunktees -- geeky funny T-shirts
http://gtdfh.branchable.com/ -- GTD for hackers
--- End Message ---