2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
7 # test multilevel dump and restores with hardlinks
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
33 # Print size ($5) and fname ($9).
34 # The size is significant since we add to the file as part
35 # of a file change for the incremental.
37 # Filter out the housekeeping files of xfsrestore
39 $AWK_PROG 'NF == 9 { print $5, $9 }' |\
40 egrep -v 'dumpdir|housekeeping|dirattr|dirextattr|namreg|state|tree'
43 # real QA test starts here
46 _create_dumpdir_hardlinks 9
48 echo "Do the incremental dumps"
50 while [ $i -le 9 ]; do
59 echo "********* level $i ***********" >>$seqres.full
61 find $SCRATCH_MNT -exec $here/src/lstat64 {} \; | sed 's/(00.*)//' >$tmp.dates.$i
64 diff -c $tmp.dates.$level_1 $tmp.dates.$i >>$seqres.full
66 cat $tmp.dates.$i >>$seqres.full
69 _do_dump_file -f $tmp.df.level$i -l $i
73 echo "Listing of what files we start with:"
74 ls -l $dump_dir | _ls_size_filter
76 echo "Look at what files are contained in the inc. dump"
78 while [ $i -le 9 ]; do
80 echo "restoring from df.level$i"
81 _do_restore_toc -f $tmp.df.level$i
85 echo "Do the cumulative restores"
88 while [ $i -le 9 ]; do
90 echo "restoring from df.level$i"
91 _do_restore_file_cum -f $tmp.df.level$i
92 echo "ls -l restore_dir"
93 ls -lR $restore_dir | _ls_size_filter | _check_quota_file