Skip to content

Commit

Permalink
Merge pull request #383 from bareos/dev/franku/master/client-initiate…
Browse files Browse the repository at this point in the history
…d-backup-systemtest

systemtests: add backup-bareos-client-initiated-test
  • Loading branch information
pstorz committed Dec 20, 2019
2 parents 58bc1c2 + 7b56f5d commit 1417cff
Show file tree
Hide file tree
Showing 38 changed files with 401 additions and 145 deletions.
2 changes: 0 additions & 2 deletions regress/DartTestfile.txt.in
Expand Up @@ -2,7 +2,6 @@ ADD_TEST(disk:webui-connection-test "@webuidir@/tests/regress/webui-bsock-connec
ADD_TEST(disk:webui-connection-test-tls "@webuidir@/tests/regress/webui-bsock-connection-test-tls")
#ADD_TEST(disk:tray-monitor-connection-test-cleartext "@regressdir@/tests/tray-monitor-connection-test-cleartext")
#ADD_TEST(disk:tray-monitor-connection-test-tls-psk "@regressdir@/tests/tray-monitor-connection-test-tls-psk")
ADD_TEST(disk:python-bareos-connection-test "@regressdir@/tests/python-bareos-connection-test")
ADD_TEST(disk:lan-addr-test "@regressdir@/tests/lan-addr-test")
ADD_TEST(disk:lan-addr-test-passive "@regressdir@/tests/lan-addr-test-passive")
#ADD_TEST(disk:always-incremental-test "@regressdir@/tests/always-incremental-test")
Expand All @@ -17,7 +16,6 @@ ADD_TEST(disk:allowed-jobcommand-test "@regressdir@/tests/allowed-jobcommand-tes
ADD_TEST(disk:auto-label-test "@regressdir@/tests/auto-label-test")
ADD_TEST(disk:backup-bareos-test "@regressdir@/tests/backup-bareos-test")
ADD_TEST(disk:backup-bareos-passive-test "@regressdir@/tests/backup-bareos-passive-test")
ADD_TEST(disk:backup-bareos-client-initiated-connection-test "@regressdir@/tests/backup-bareos-client-initiated-connection-test")
ADD_TEST(disk:backup-to-null "@regressdir@/tests/backup-to-null")
ADD_TEST(disk:base-job-test "@regressdir@/tests/base-job-test")
ADD_TEST(disk:bconsole-test "@regressdir@/tests/bconsole-test")
Expand Down
97 changes: 0 additions & 97 deletions regress/tests/backup-bareos-client-initiated-connection-test

This file was deleted.

43 changes: 0 additions & 43 deletions regress/tests/python-bareos-connection-test

This file was deleted.

1 change: 1 addition & 0 deletions systemtests/CMakeLists.txt
Expand Up @@ -321,6 +321,7 @@ set(SYSTEM_TESTS
reload-works-on-adding-empty-job-resource
reload-works-on-adding-second-director-resource
reload-works-on-adding-client-resource
backup-bareos-client-initiated-test
)

set(SYSTEM_TESTS_DISABLED # initialy empty
Expand Down
3 changes: 0 additions & 3 deletions systemtests/tests/TODO.txt
Expand Up @@ -31,7 +31,6 @@ disk:allowed-jobcommand-test
disk:allowed-scriptdir-test
disk:always-incremental-test
disk:auto-label-test
disk:backup-bareos-client-initiated-connection-test
disk:backup-to-null
disk:bandwidth-limit-per-client-test
disk:base-job-test
Expand Down Expand Up @@ -101,14 +100,12 @@ disk:prune-config-test
disk:prune-copy-test
disk:prune-migration-test
disk:prune-test
disk:python-bareos-connection-test
disk:query-test
disk:quota-hardquota-test
disk:quota-includefailed-test
disk:quota-softquota-test
disk:recycle-test
disk:regexwhere-test
disk:reload-test
disk:rerun-test
disk:restore-by-file-test
disk:restore-disk-seek-test
Expand Down
@@ -0,0 +1,8 @@
Catalog {
Name = MyCatalog
#dbdriver = "@DEFAULT_DB_TYPE@"
dbdriver = "XXX_REPLACE_WITH_DATABASE_DRIVER_XXX"
dbname = "@db_name@"
dbuser = "@db_user@"
dbpassword = "@db_password@"
}
@@ -0,0 +1,8 @@
Client {
Name = @basename@-fd
Description = "Client resource of the Director itself."
Address = localhost
Password = "@fd_password@" # password for FileDaemon
Connection From Client To Director = yes
Connection From Director To Client = no
}
@@ -0,0 +1,7 @@
Console {
Name = bareos-mon
Description = "Restricted console used by tray-monitor to get the status of the director."
Password = "@mon_dir_password@"
CommandACL = status, .status
JobACL = *all*
}
@@ -0,0 +1,27 @@
Director { # define myself
Name = bareos-dir
QueryFile = "@scriptdir@/query.sql"
Maximum Concurrent Jobs = 10
Password = "@dir_password@" # Console password
Messages = Daemon
Auditing = yes

# Enable the Heartbeat if you experience connection losses
# (eg. because of your router or firewall configuration).
# Additionally the Heartbeat can be enabled in bareos-sd and bareos-fd.
#
# Heartbeat Interval = 1 min

# remove comment in next line to load dynamic backends from specified directory
Backend Directory = @backenddir@

# remove comment from "Plugin Directory" to load plugins from specified directory.
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all director plugins (*-dir.so) from the "Plugin Directory".
#
# Plugin Directory = "@python_plugin_module_src_dir@"
# Plugin Names = ""
Working Directory = "@working_dir@"
Pid Directory = "@piddir@"
DirPort = @dir_port@
}
@@ -0,0 +1,11 @@
FileSet {
Name = "Catalog"
Description = "Backup the catalog dump and Bareos configuration files."
Include {
Options {
signature = MD5
}
File = "@working_dir@/@db_name@.sql" # database dump
File = "@confdir@" # configuration
}
}
@@ -0,0 +1,11 @@
FileSet {
Name = "SelfTest"
Description = "fileset just to backup some files for selftest"
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
}
#File = "@sbindir@"
File=<@tmpdir@/file-list
}
}
@@ -0,0 +1,20 @@
Job {
Name = "BackupCatalog"
Description = "Backup the catalog database (after the nightly save)"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"

# This creates an ASCII copy of the catalog
# Arguments to make_catalog_backup.pl are:
# make_catalog_backup.pl <catalog-name>
RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog"

# This deletes the copy of the catalog
RunAfterJob = "@scriptdir@/delete_catalog_backup"

# This sends the bootstrap via mail for disaster recovery.
# Should be sent to another system, please change recipient accordingly
Write Bootstrap = "|@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" # (#01)
Priority = 11 # run after main backup
}
@@ -0,0 +1,11 @@
Job {
Name = "RestoreFiles"
Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..."
Type = Restore
Client = @basename@-fd
FileSet = SelfTest
Storage = File
Pool = Incremental
Messages = Standard
Where = @tmp@/bareos-restores
}
@@ -0,0 +1,5 @@
Job {
Name = "backup-bareos-fd"
JobDefs = "DefaultJob"
Client = "@basename@-fd"
}
@@ -0,0 +1,15 @@
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = @basename@-fd
FileSet = "SelfTest"
Storage = File
Messages = Standard
Pool = Incremental
Priority = 10
Write Bootstrap = "@working_dir@/%c.bsr"
Full Backup Pool = Full # write Full Backups into "Full" Pool
Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool
Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool
}
@@ -0,0 +1,7 @@
Messages {
Name = Daemon
Description = "Message delivery for daemon messages (no job)."
console = all, !skipped, !saved, !audit
append = "@logdir@/bareos.log" = all, !skipped, !audit
append = "@logdir@/bareos-audit.log" = audit
}
@@ -0,0 +1,7 @@
Messages {
Name = Standard
Description = "Reasonable message delivery -- send most everything to email address and to the console."
console = all, !skipped, !saved, !audit
append = "@logdir@/bareos.log" = all, !skipped, !saved, !audit
catalog = all, !skipped, !saved, !audit
}
@@ -0,0 +1,10 @@
Pool {
Name = Differential
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days # How long should the Differential Backups be kept? (#09)
Maximum Volume Bytes = 10G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Differential-" # Volumes will be labeled "Differential-<volume-id>"
}
@@ -0,0 +1,10 @@
Pool {
Name = Full
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # How long should the Full Backups be kept? (#06)
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>"
}
@@ -0,0 +1,10 @@
Pool {
Name = Incremental
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 30 days # How long should the Incremental Backups be kept? (#12)
Maximum Volume Bytes = 1G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
Label Format = "Incremental-" # Volumes will be labeled "Incremental-<volume-id>"
}
@@ -0,0 +1,4 @@
Pool {
Name = Scratch
Pool Type = Scratch
}
@@ -0,0 +1,18 @@
Profile {
Name = operator
Description = "Profile allowing normal Bareos operations."

Command ACL = !.bvfs_clear_cache, !.exit, !.sql
Command ACL = !configure, !create, !delete, !purge, !prune, !sqlquery, !umount, !unmount
Command ACL = *all*

Catalog ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Job ACL = *all*
Plugin Options ACL = *all*
Pool ACL = *all*
Schedule ACL = *all*
Storage ACL = *all*
Where ACL = *all*
}

0 comments on commit 1417cff

Please sign in to comment.