list volumes
wait
messages
-@$out ${cwd}/tmp/log3.out
@#
@# Now do another backup, but level Incremental
@#
@#
@# This final job that runs should be Incremental and
@# not upgraded to full.
+@exec "touch $cwd/build/po/fr.po"
+run job=$JobName level=Incremental yes
+wait
+messages
+@$out ${cwd}/tmp/log10.out
+@sleep 1
+list jobs
+prune jobs yes
list jobs
+@################################################################
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+list volumes
+restore where=${cwd}/tmp/bacula-restores select
+unmark *
+mark *
+done
+yes
+list volumes
+wait
messages
quit
END_OF_DATA
check_for_zombie_jobs storage=File
stop_bacula
-touch $tmp/log2.out
check_two_logs
+check_restore_diff
# Now we will verify that the pruning code is working as expected. Each time,
# we run 'list jobs', 'prune', 'list jobs'. check_prune_list ensures that jobids
# them (same number), and checks that the last 'list jobs' doesn't contain them
# anymore. See scripts/functions.pm for details.
-$bperl -e "check_prune_list('$tmp/log3.out',1,3,4,5,6,7)"
+# Copy jobs are pruned like normal jobs after the Job Retention period
+# the admin 'c'opy job should also be pruned
+# F F c c C C I0 I -> F I
+$bperl -e "check_prune_list('$tmp/log10.out',1,3,4,5,6,7)"
estat=$(($estat + $?))
end_test
messages
@sleep 1
@################################################################
-@$out $cwd/tmp/log3.out
+@$out $cwd/tmp/log10.out
@#
-@# This final job that runs should be Incremental and
-@# not upgraded to full.
list jobs
prune jobs yes
list jobs
# them (same number), and checks that the last 'list jobs' doesn't contain them
# anymore. See scripts/functions.pm for details.
-$bperl -e "check_prune_list('$tmp/log3.out',1,2,3,4,5,7)"
+# M M g g F F I0 -> F
+$bperl -e "check_prune_list('$tmp/log10.out',1,2,3,4,5,7)"
estat=$(($estat + $?))
end_test