4 # test multilevel dump and restores with hardlinks
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
28 echo "QA output created by $seq"
32 status=1 # failure is the default!
33 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
35 # get standard environment, filters and checks
44 # Print size ($5) and fname ($9).
45 # The size is significant since we add to the file as part
46 # of a file change for the incremental.
48 # Filter out the housekeeping files of xfsrestore
50 $AWK_PROG 'NF == 9 { print $5, $9 }' |\
51 egrep -v 'dumpdir|housekeeping|dirattr|dirextattr|namreg|state|tree'
54 # real QA test starts here
56 _supported_os IRIX Linux
58 _create_dumpdir_hardlinks 9
60 echo "Do the incremental dumps"
62 while [ $i -le 9 ]; do
71 echo "********* level $i ***********" >>$seq.full
73 find $SCRATCH_MNT -exec $here/src/lstat64 {} \; | sed 's/(00.*)//' >$tmp.dates.$i
76 diff -c $tmp.dates.$level_1 $tmp.dates.$i >>$seq.full
78 cat $tmp.dates.$i >>$seq.full
81 dump_file=$tmp.df.level$i
86 echo "Listing of what files we start with:"
87 ls -l $dump_dir | _ls_size_filter
89 echo "Look at what files are contained in the inc. dump"
91 while [ $i -le 9 ]; do
93 echo "restoring from df.level$i"
94 dump_file=$tmp.df.level$i
99 echo "Do the cumulative restores"
101 while [ $i -le 9 ]; do
102 dump_file=$tmp.df.level$i
104 echo "restoring from df.level$i"
105 _do_restore_file_cum -l $i
106 echo "ls -l restore_dir"
107 ls -lR $restore_dir | _ls_size_filter | _check_quota_file