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 _scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
43 _create_dumpdir_hardlinks 9
45 echo "Do the incremental dumps"
47 while [ $i -le 9 ]; do
56 echo "********* level $i ***********" >>$seqres.full
58 find $SCRATCH_MNT -exec $here/src/lstat64 {} \; | sed 's/(00.*)//' >$tmp.dates.$i
61 diff -c $tmp.dates.$level_1 $tmp.dates.$i >>$seqres.full
63 cat $tmp.dates.$i >>$seqres.full
66 _do_dump_file -f $tmp.df.level$i -l $i
70 echo "Listing of what files we start with:"
71 ls -l $dump_dir | _ls_size_filter
73 echo "Look at what files are contained in the inc. dump"
75 while [ $i -le 9 ]; do
77 echo "restoring from df.level$i"
78 _do_restore_toc -f $tmp.df.level$i
82 echo "Do the cumulative restores"
85 while [ $i -le 9 ]; do
87 echo "restoring from df.level$i"
88 _do_restore_file_cum -f $tmp.df.level$i
89 echo "ls -l restore_dir"
90 ls -lR $restore_dir | _ls_size_filter | _check_quota_file