Marcelo wrote:
> The last one was the product of me trying to figure out if a failure
> (see other email) was because of the script or a real failure. It just
> moves the RESTORE_DIR and RESTORE_SUBDIR (this one is not really
> needed) to the top of the substitution list, otherwise you end up with
> something like "SCRATCH_MNT/some/random/directory".
>
I don't think your filter change has any use.
I presume this is what you meant by "this one is not really needed".
Consider:
_dir_filter()
{
sed \
-e "s#$dump_file#DUMP_FILE#" \
-e "s#$SCRATCH_DEV#SCRATCH_DEV#" \
-e "s#$dumptape#TAPE_DEV#" \
-e "s#$dump_dir#DUMP_DIR#g" \
-e "s#$restore_dir#RESTORE_DIR#g" \
-e "s#$SCRATCH_MNT#SCRATCH_MNT#g" \
-e "s#$dump_sdir#DUMP_SUBDIR#g" \
-e "s#$restore_sdir#RESTORE_SUBDIR#g" \
}
Only DUMP_SUBDIR and RESTORE_SUBDIR are after SCRATCH_MNT.
And as you can see below, these are just one word relative
paths which don't include SCRATCH_MNT.
dump_file=$tmp.dumpfile
dump_dir=$SCRATCH_MNT/dump.$$
restore_dir=$SCRATCH_MNT/restore.$$
dump_sdir=dump.$$
restore_sdir=restore.$$
The message you saw for the xfsrestore and xfsinvutil failure
has SCRATCH_MNT/restore......
because there is no attempt to filter it out (only see it on failure).
The filtering used after xfsdump/xfsrestore/xfsinvutil
is by _dump_filter.
Thanks.
Ciao,
Tim.
|