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

Commit

Permalink
Added basic SCSI crypto check regress test
Browse files Browse the repository at this point in the history
This test sets up the hardware encryption and labels a tape with
encryption. Then it does backup and restore tests.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
pstorz authored and Marco van Wieringen committed Feb 23, 2013
1 parent 10487ab commit f816822
Show file tree
Hide file tree
Showing 7 changed files with 561 additions and 0 deletions.
1 change: 1 addition & 0 deletions DartTestfile.txt.in
Expand Up @@ -97,6 +97,7 @@ ADD_TEST(disk:quota-hardquota-test "@regressdir@/tests/quota-hardquota-test")
ADD_TEST(disk:quota-includefailed-test "@regressdir@/tests/quota-includefailed-test")
ADD_TEST(disk:bandwidth-limit-per-client-test "@regressdir@/tests/bandwidth-limit-per-client-test")

ADD_TEST(tape:scsi-crypto-tape "@regressdir@/tests/scsi-crypto-test")
ADD_TEST(tape:ansi-label-tape "@regressdir@/tests/ansi-label-tape")
ADD_TEST(tape:backup-bareos-tape "@regressdir@/tests/backup-bareos-tape")
ADD_TEST(tape:bscan-tape "@regressdir@/tests/bscan-tape")
Expand Down
1 change: 1 addition & 0 deletions all-tape-tests
Expand Up @@ -17,6 +17,7 @@ echo " " >>test.out
echo "Start all non-root tape tests"
echo "Start all non-root tape tests" >>test.out
rm -f dumps/*
./run tests/scsi-crypto-test
./run tests/ansi-label-tape
./run tests/backup-bareos-tape
./run tests/bscan-tape
Expand Down
330 changes: 330 additions & 0 deletions configs/scsi-crypto-test/bareos-dir.conf.scsi-crypto-test.in
@@ -0,0 +1,330 @@
#
# Default Bareos Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#
# For Bareos release 1.33
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
# directives in the Messages resource.
#

Director { # define myself
Name = localhost-dir
DIRPort = 8101 # where we listen for UA connections
QueryFile = "/root/bareos-regress/bin/query.sql"
WorkingDirectory = "/root/bareos-regress/working"
PidDirectory = "/root/bareos-regress/working"
Maximum Concurrent Jobs = 100
Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
Messages = Daemon
FD Connect Timeout = 2min
@@sbindir@/scsicrypto-dir.conf
}

#
# Define the main nightly save backup job
# By default, this job will back up to disk in /root/bareos-regress/tmp
Job {
Name = "NightlySave"
Type = Backup
Client = localhost-fd
FileSet="Full Set"
Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "/root/bareos-regress/working/NightlySave.bsr"
Maximum Concurrent Jobs = 100
SpoolData = yes
# Prefer Mounted Volumes = no
Max Run Time = 30min
}


Job {
Name = "NightlySave1"
Type = Backup
Client = localhost-fd
FileSet="Full Set"
Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "/root/bareos-regress/working/NightlySave.bsr"
Maximum Concurrent Jobs = 100
SpoolData = yes
# Prefer Mounted Volumes = no
Client Run Before Job = "sleep 5"
Max Run Time = 30min
}

Job {
Name = "NightlySave2"
Type = Backup
Client=localhost-fd
FileSet="Full Set"
Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "/root/bareos-regress/working/NightlySave.bsr"
Maximum Concurrent Jobs = 100
SpoolData = yes
# Prefer Mounted Volumes = no
Max Run Time = 30min
}

Job {
Name = "VerifyTape"
Type = Verify
Level = VolumeToCatalog
Client=localhost-fd
FileSet="Verify Set"
Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "/root/bareos-regress/working/NightlySave.bsr"
Maximum Concurrent Jobs = 100
SpoolData = yes
# Prefer Mounted Volumes = no
Max Run Time = 30min
}

Job {
Name = "Virtual"
Type = Backup
Client=localhost-fd
FileSet="Full Set"
Storage = Virtual
Messages = Standard
Pool = Default
Write Bootstrap = "/root/bareos-regress/working/NightlySave.bsr"
Maximum Concurrent Jobs = 100
SpoolData = yes
# Prefer Mounted Volumes = no
Max Run Time = 30min
}



# Standard Restore template, to be changed by Console program
Job {
Name = "RestoreFiles"
Type = Restore
Client=localhost-fd
FileSet="Full Set"
Storage = tape
Messages = Standard
Pool = Default
Where = /root/bareos-regress/tmp/bareos-restores
Max Run Time = 30min
}


# List of files to be backed up
FileSet {
Name = "Full Set"
Include { Options { signature=MD5 }
File = </root/bareos-regress/tmp/file-list
}
}

FileSet {
Name = "Verify Set"
Include {
Options {
signature=MD5
verify=pins1
}
File = </root/bareos-regress/tmp/file-list
}
}



#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 1:05
Run = Differential 2nd-5th sun at 1:05
Run = Incremental mon-sat at 1:05
}

# Client (File Services) to backup
Client {
Name = localhost-fd
Address = localhost
FDPort = 8102
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
Maximum Concurrent Jobs = 100
}

# Definition of File storage device
Storage {
Name = File
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
}

# Definition of File2 storage device
Storage {
Name = File2
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia2 # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
}

# Definition of File3 storage device
Storage {
Name = File3
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia3 # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
}

# Definition of File4 storage device
Storage {
Name = File4
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia4 # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
}

# Definition of DDS tape storage device
Storage {
Name = tape
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = tape # must be same as Device in Storage daemon
Media Type = tape # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
# Autochanger = yes
}

# Definition of Virtual storage device
Storage {
Name = Virtual
Address = localhost # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = Virtual # must be same as Device in Storage daemon
Media Type = Disk # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
Autochanger = yes
}




# Generic catalog service
Catalog {
Name = MyCatalog

dbname = regress; user = root; password = ""
}

# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
mailcommand = "/root/bareos-regress/bin/bsmtp -h localhost -f \"\(Bareos regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r"
operatorcommand = "/root/bareos-regress/bin/bsmtp -h localhost -f \"\(Bareos regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r"
# MailOnError = pstorz@dass-it.de = all, !terminate
# operator = pstorz@dass-it.de = mount
console = all, !skipped, !terminate, !restored
#
# WARNING! the following will create a file that you must cycle from
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if the scroll off the console.
#
append = "/root/bareos-regress/working/log" = all, !skipped
catalog = all, !skipped
}

#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/root/bareos-regress/bin/bsmtp -h localhost -f \"\(Bareos regression\) %r\" -s \"Regression daemon message\" %r"
# mail = pstorz@dass-it.de = all, !skipped
console = all, !skipped, !saved
append = "/root/bareos-regress/working/log" = all, !skipped
catalog = all, !skipped
}


# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
RecyclePool=Scratch # test forward reference
}

Pool {
Name = Full
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
}

Pool {
Name = Inc
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
}

Pool {
Name = Scratch
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
Recycle Pool = Scratch # recycle back here
}

Pool {
Name = Special
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
ScratchPool = SpecialScratch
Maximum Volume Jobs = 1
}

Pool {
Name = SpecialScratch
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
Recycle Pool = SpecialScratch # recycle back here
}

0 comments on commit f816822

Please sign in to comment.