This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regression test for allowed job commmand
Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
- Loading branch information
Showing
5 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
configs/allowed-jobcommand-test/bareos-dir.conf.allowed-jobcommand-test.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# | ||
# 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. | ||
# | ||
# 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 = @hostname@-dir | ||
DIRPort = @dirport@ # where we listen for UA connections | ||
QueryFile = "@scriptdir@/query.sql" | ||
WorkingDirectory = "@working_dir@" | ||
PidDirectory = "@piddir@" | ||
SubSysDirectory = "@subsysdir@" | ||
Maximum Concurrent Jobs = 4 | ||
Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password | ||
Messages = Standard | ||
} | ||
|
||
JobDefs { | ||
Name = "DefaultJob" | ||
Type = Backup | ||
Level = Incremental | ||
Client = @hostname@-fd | ||
FileSet = FS_TESTJOB | ||
Storage = File | ||
Messages = Standard | ||
Pool = Default | ||
Priority = 10 | ||
Maximum Concurrent Jobs = 16 | ||
} | ||
|
||
Job { | ||
Name = "BackupClient1" | ||
JobDefs = "DefaultJob" | ||
Client Run Before Job = "@working_dir@/runbeforejob.sh" | ||
} | ||
|
||
|
||
FileSet { | ||
Name = FS_TESTJOB | ||
Include { | ||
File=<@tmpdir@/file-list | ||
} | ||
} | ||
|
||
#dir: BeforeJob: run command "/bin/echo RunBeforeJob" | ||
#fd: ClientRunBeforeJob: ClientRunBeforeJob | ||
#fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob" | ||
#dir: AfterJob: run command "/bin/echo RunAfterJob" | ||
|
||
|
||
# Client (File Services) to backup | ||
Client { | ||
Name = @hostname@-fd | ||
Address = @hostname@ | ||
FDPort = @fdport@ | ||
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 = 4 | ||
|
||
} | ||
|
||
# Definiton of file storage device | ||
Storage { | ||
Name = File | ||
Address = @hostname@ # N.B. Use a fully qualified name here | ||
SDPort = @sdport@ | ||
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" | ||
Device = FileStorage | ||
Media Type = File | ||
Maximum Concurrent Jobs = 4 | ||
} | ||
|
||
# Generic catalog service | ||
Catalog { | ||
Name = MyCatalog | ||
@libdbi@ | ||
dbname = @db_name@; user = @db_user@; password = "@db_password@" | ||
} | ||
|
||
|
||
Messages { | ||
Name = Standard | ||
console = all, !skipped, !saved | ||
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 | ||
} | ||
|
||
|
||
# | ||
## Standard Restore template, to be changed by Console program | ||
## Only one such job is needed for all Jobs/Clients/Storage ... | ||
## | ||
Job { | ||
Name = "RestoreFiles" | ||
Type = Restore | ||
Client = @hostname@-fd | ||
FileSet= FS_TESTJOB | ||
Storage = File | ||
Pool = Default | ||
Messages = Standard | ||
Where = /tmp/bareos-restores | ||
} |
38 changes: 38 additions & 0 deletions
38
configs/allowed-jobcommand-test/bareos-fd.conf.allowed-jobcommand-test.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Default Bareos File Daemon Configuration file | ||
# | ||
# There is not much to change here except perhaps the | ||
# File daemon Name to | ||
# | ||
|
||
# | ||
# List Directors who are permitted to contact this File daemon | ||
# | ||
Director { | ||
Name = @hostname@-dir | ||
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon | ||
Allowed Script Dir = "@working_dir@" | ||
} | ||
|
||
# | ||
# "Global" File daemon configuration specifications | ||
# | ||
FileDaemon { # this is me | ||
Name = @hostname@-fd | ||
FDPort = @fdport@ # where we listen for the director | ||
WorkingDirectory = @working_dir@ | ||
Pid Directory = @piddir@ | ||
Maximum Concurrent Jobs = 20 | ||
|
||
Allowed Job Command = runscript | ||
Allowed Job Command = backup | ||
Allowed Job Command = restore | ||
Allowed Job Command = verify | ||
Allowed Job Command = estimate | ||
} | ||
|
||
# Send all messages except skipped files back to Director | ||
Messages { | ||
Name = Standard | ||
director = @hostname@-dir = all, !skipped, !restored | ||
} |
Oops, something went wrong.