Re: Extracting a single directory from a partial incremental dump?
"Felix E. Klee" <[email protected]> Sat, 29 Oct 2005 11:11:17 +0200
| Newsgroups | gmane.comp.archivers.star.user |
|---|---|
| Message-ID | <87irvghemi.wl%[email protected]> |
At Tue, 18 Oct 2005 15:07:09 +0200,
Joerg Schilling wrote:
> Note that you need to start with creating a _new_ level 0 backup as
> the bug did cause the inode list for a directory to get corrupted on
> the aresultant archive.
>
> The probability for this to happen was approx.: 1 : 40,000,000 this is
> why it took so long to be discovered.
Unfortunately, either the bug persists in version 1.5a67 or we're
subject to a misunderstanding. When I execute the script below on my
system (Linux kernel 2.4.29, format 3.6 Reiser FS) I get output such as
the following, i.e. star panics:
> ./star-test
Creating archive...
Type of this level 0 dump: full
Date of this level 0 dump: Fri Oct 28 18:27:02 2005
Date of last level 0 dump: the epoch
star: 1 blocks + 0 bytes (total of 10240 bytes = 10.00k).
Dump record level 0 dump: Fri Oct 28 18:27:02 2005 written
Done.
Extracting archive...
Validating this dump against restored filesystem...
Dump level 0 on empty filesystem, starting restore.
star: pfind_node(): Not a directory 'B' for 'B/a' flags 0 i_dir 0.
star: padd_node(): caller 'sym_addrec'.
star: padd_node(): Not a directory 'B' for 'B/a' flags 0 i_dir 0.
star: padd_node(B/a, 6, 0, 0) = NULL
star: WARNING: No old inode number for
star: WARNING: No new inode number for
star: WARNING: No new inode number for /B
star: Panic: cannot add node 'B/a'.
The script:
#!/bin/bash
source_dir="/media/hda2" && \
archive_dir="/tmp/backup" && \
extract_dir="/media/hda3" && \
archive="$archive_dir/bla.tar" && \
dumps="$archive_dir/bla.dumps" || exit $?
test "$source_dir" != "" && rm -rf "$source_dir"/* && \
mkdir "$source_dir/A" "$source_dir/B" && \
touch "$source_dir/A/a" "$source_dir/B/a" || exit $?
rm -rf "$archive_dir" && \
mkdir -p "$archive_dir" || exit $?
echo "Creating archive..." && \
touch "$dumps" && \
star -c -xdev -level=0 tardumps="$dumps" -wtardumps file="$archive" \
-C "$source_dir" . && \
echo "Done." && \
echo || exit $?
echo "Extracting archive..." && \
rm -rf $extract_dir/* && \
star -xpU -restore -force-restore file="$archive" -C $extract_dir A && \
echo "Done." || exit $?
Note that my real backup script utilizes many more star options than the
script above, and it creates a partial dump instead of a full dump. For
testing purposes, though, I decided to keep things simple.
--
Felix E. Klee