type_admin: introduce media-changer / tape admin wrapper
- tape_admin: helper script to handle common tape handling routines - mtx: is used for media-changer functions - json: define media-pools, corresponding volume-names and attributes Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2
Makefile
2
Makefile
@@ -23,6 +23,7 @@ SNAPPER_TEMPLATES ?= /etc/snapper/config-templates
|
||||
DSNAP_SYNC_EXAMPLES = /usr/share/doc/dsnap-sync
|
||||
|
||||
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
|
||||
ETC_DIR = $(DESTDIR)/etc
|
||||
SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
|
||||
DOC_DIR = $(DESTDIR)$(PREFIX)/share/doc/$(PKGNAME)
|
||||
|
||||
@@ -31,5 +32,6 @@ DOC_DIR = $(DESTDIR)$(PREFIX)/share/doc/$(PKGNAME)
|
||||
install:
|
||||
@./find_snapper_config || sed -i 's@^SNAPPER_CONFIG=.*@SNAPPER_CONFIG='$(SNAPPER_CONFIG)'@g' bin/$(PKGNAME)
|
||||
@install -Dm755 bin/* -t $(BIN_DIR)/
|
||||
@install -Dm644 etc/* -t $(DESTDIR)/$(ETC_DIR)/
|
||||
@install -Dm644 $(SNAPPER_TEMPLATES)/* -t $(DESTDIR)/$(SNAPPER_TEMPLATES)/
|
||||
@install -Dm644 $(DSNAP_SYNC_EXAMPLES)/* -t $(DESTDIR)/$(DOC_DIR)/
|
||||
|
||||
1075
bin/tape_admin
Executable file
1075
bin/tape_admin
Executable file
File diff suppressed because it is too large
Load Diff
32
etc/dsnap-sync/MediaPools.json
Normal file
32
etc/dsnap-sync/MediaPools.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"MediaPools": "Daywalker-Pools",
|
||||
"MediaPool": [
|
||||
{
|
||||
"_comment": "MediaPool append",
|
||||
"Name": "Pool 1",
|
||||
"Member":[
|
||||
{ "VolumeName": "Tape-0001", "VolumeId": "000001", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0002", "VolumeId": "000002", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0003", "VolumeId": "000003", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0004", "VolumeId": "000004", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0005", "VolumeId": "000005", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0006", "VolumeId": "000006", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0007", "VolumeId": "000007", "MediaPolicy": "append" },
|
||||
{ "VolumeName": "Tape-0008", "VolumeId": "000008", "MediaPolicy": "append" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"_comment": "MediaPool overwrite",
|
||||
"Name": "Pool 2",
|
||||
"Member":[
|
||||
{ "VolumeName": "Tape-0009", "VolumeId": "000001", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0010", "VolumeId": "000002", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0011", "VolumeId": "000003", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0012", "VolumeId": "000004", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0013", "VolumeId": "000005", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0014", "VolumeId": "000006", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
|
||||
{ "VolumeName": "Tape-0015", "VolumeId": "000007", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user