Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
action-on-purge-test: backup ${tmp}/data
Browse files Browse the repository at this point in the history
Don't backup ${src}, as this directory is not always available.
  • Loading branch information
joergsteffens committed Dec 11, 2017
1 parent a5a19fc commit a9556db
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions tests/action-on-purge-test
@@ -1,19 +1,33 @@
#!/bin/sh
#
#

. scripts/functions

TestName="action-on-purge-test"
JobName=FIFOTest
. scripts/functions

cwd=`pwd`
# Directory to backup.
# This directory will be created by setup_data().
# If set, $BackupDirectory will be used
# as base directory by check_restore_diff().
# Don't use a "/" at the end of the directory path,
# as it might cause problems
# (filenames given as parameter to restore must match 100%. "//" are not identical with "/").
BackupDirectory="${tmp}/data"


scripts/cleanup
scripts/copy-test-confs

echo $src > $tmp/file-list

sed 's/Pool Type = Backup/Pool Type = Backup; ActionOnPurge = Truncate/' $conf/bareos-dir.conf > $tmp/1
cp $tmp/1 $conf/bareos-dir.conf

# Use a tgz to setup data to be backuped.
# Data will be placed at "${tmp}/data".
setup_data data/small.tgz


start_test

cat >tmp/bconcmds <<END_OF_DATA
Expand Down

0 comments on commit a9556db

Please sign in to comment.