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 _begin_fstest dump auto
12 # Override the default cleanup function.
20 # Import common functions.
27 # Print size ($5) and fname ($9).
28 # The size is significant since we add to the file as part
29 # of a file change for the incremental.
31 # Filter out the housekeeping files of xfsrestore
33 $AWK_PROG 'NF == 9 { print $5, $9 }' |\
34 egrep -v 'dumpdir|housekeeping|dirattr|dirextattr|namreg|state|tree'
37 # real QA test starts here
40 _create_dumpdir_hardlinks 9
42 echo "Do the incremental dumps"
44 while [ $i -le 9 ]; do
53 echo "********* level $i ***********" >>$seqres.full
55 find $SCRATCH_MNT -exec $here/src/lstat64 {} \; | sed 's/(00.*)//' >$tmp.dates.$i
58 diff -c $tmp.dates.$level_1 $tmp.dates.$i >>$seqres.full
60 cat $tmp.dates.$i >>$seqres.full
63 _do_dump_file -f $tmp.df.level$i -l $i
67 echo "Listing of what files we start with:"
68 ls -l $dump_dir | _ls_size_filter
70 echo "Look at what files are contained in the inc. dump"
72 while [ $i -le 9 ]; do
74 echo "restoring from df.level$i"
75 _do_restore_toc -f $tmp.df.level$i
79 echo "Do the cumulative restores"
82 while [ $i -le 9 ]; do
84 echo "restoring from df.level$i"
85 _do_restore_file_cum -f $tmp.df.level$i
86 echo "ls -l restore_dir"
87 ls -lR $restore_dir | _ls_size_filter | _check_quota_file