Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add example to Selection Type = Sql Query
- show query example for `Selection Pattern` when `Selection Type` is Sql Query. Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com> Co-authored-by: Jörg Steffens <joergsteffens@users.noreply.github.com>
- Loading branch information
1 parent
cf639da
commit 5948aff
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
docs/manuals/source/include/config/DirSelectionPatterns-sql1.conf
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,19 @@ | ||
|
||
# SQL selecting all jobid in pool "Full" | ||
# which is a terminated backup (T,W) | ||
# and was never copied or migrated (PriorJobid 0). | ||
|
||
Job { | ||
Name = "<name>" | ||
JobDefs = "DefaultJob" | ||
Type = Migrate | ||
Selection Type = SQL Query | ||
# Multiple lines instructions is available since version 21.0.0 | ||
Selection Pattern = "WITH pids AS | ||
( SELECT poolid FROM pool WHERE name = 'Full' ) | ||
SELECT jobid FROM job j, pids p | ||
WHERE j.poolid=p.poolid | ||
AND type='B' | ||
AND jobstatus IN ('T','W') | ||
AND priorjobid = 0;" | ||
} |
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