]> git.proxmox.com Git - proxmox-backup.git/blame - docs/tape-backup.rst
run cargo fmt
[proxmox-backup.git] / docs / tape-backup.rst
CommitLineData
225affc9
DM
1.. _tape_backup:
2
5f79dc28
DM
3Tape Backup
4===========
5
53939bb4 6.. image:: images/screenshots/pbs-gui-tape-changer-overview.png
5565e454 7 :target: _images/pbs-gui-tape-changer-overview.png
53939bb4
DW
8 :align: right
9 :alt: Tape Backup: Tape changer overview
10
66d06696
DC
11Proxmox tape backup provides an easy way to store datastore content
12onto magnetic tapes. This increases data safety because you get:
5f79dc28 13
70d00e01
DW
14- an additional copy of the data,
15- on a different media type (tape),
02633961 16- to an additional location (you can move tapes off-site)
5f79dc28 17
66d06696 18In most restore jobs, only data from the last backup job is restored.
70d00e01 19Restore requests further decline, the older the data
0bce2118 20gets. Considering this, tape backup may also help to reduce disk
70d00e01
DW
21usage, because you can safely remove data from disk, once it's archived on
22tape. This is especially true if you need to retain data for several
0bce2118 23years.
54d96866
DM
24
25Tape backups do not provide random access to the stored data. Instead,
70d00e01 26you need to restore the data to disk, before you can access it
02633961 27again. Also, if you store your tapes off-site (using some kind of tape
70d00e01
DW
28vaulting service), you need to bring them back on-site, before you can do any
29restores. So please consider that restoring from tape can take much
30longer than restoring from disk.
5f79dc28
DM
31
32
33Tape Technology Primer
34----------------------
35
70d00e01 36.. _Linear Tape-Open: https://en.wikipedia.org/wiki/Linear_Tape-Open
5f79dc28 37
70d00e01
DW
38As of 2021, the only widely available tape technology standard is
39`Linear Tape-Open`_ (LTO). Different vendors offer LTO Ultrium tape
40drives, auto-loaders, and LTO tape cartridges.
54d96866 41
70d00e01
DW
42There are a few vendors that offer proprietary drives with
43slight advantages in performance and capacity. Nevertheless, they have
66d06696 44significant disadvantages:
54d96866
DM
45
46- proprietary (single vendor)
47- a much higher purchase cost
48
66d06696 49So we currently do not test such drives.
5f79dc28
DM
50
51In general, LTO tapes offer the following advantages:
52
70d00e01 53- Durability (30 year lifespan)
5f79dc28
DM
54- High Capacity (12 TB)
55- Relatively low cost per TB
56- Cold Media
57- Movable (storable inside vault)
58- Multiple vendors (for both media and drives)
53939bb4 59- Built in AES-GCM Encryption engine
d5efa18a 60
02633961
TL
61Note that `Proxmox Backup Server` already stores compressed data, so using the
62tape compression feature has no advantage.
54d96866 63
d5efa18a
DM
64
65Supported Hardware
66------------------
67
34407477 68`Proxmox Backup`_ Server supports `Linear Tape-Open`_ generation 5 (LTO-5)
ae5b1e18
DC
69or later and has best-effort support for generation 4 (LTO-4). While
70many LTO-4 systems are known to work, some might need firmware updates or
71do not implement necessary features to work with Proxmox Backup Server.
d5efa18a 72
ee9fa953
DM
73Tape changing is carried out using the SCSI Medium Changer protocol,
74so all modern tape libraries should work.
75
76.. Note:: We use a custom user space tape driver written in Rust_. This
77 driver directly communicates with the tape drive using the SCSI
53939bb4
DW
78 generic interface. This may have negative side effects when used with the old
79 Linux kernel tape driver, so you should not use that driver with
ee9fa953 80 Proxmox tape backup.
d5efa18a
DM
81
82
8a192bed
DM
83Drive Performance
84~~~~~~~~~~~~~~~~~
85
70d00e01 86Current LTO-8 tapes provide read/write speeds of up to 360 MB/s. This means,
66d06696 87that it still takes a minimum of 9 hours to completely write or
8a192bed
DM
88read a single tape (even at maximum speed).
89
53939bb4 90The only way to speed that data rate up is to use more than one
70d00e01 91drive. That way, you can run several backup jobs in parallel, or run
8a192bed
DM
92restore jobs while the other dives are used for backups.
93
70d00e01
DW
94Also consider that you first need to read data from your datastore
95(disk). However, a single spinning disk is unable to deliver data at this
66d06696 96rate. We measured a maximum rate of about 60MB/s to 100MB/s in practice,
70d00e01
DW
97so it takes 33 hours to read the 12TB needed to fill up an LTO-8 tape. If you want
98to write to your tape at full speed, please make sure that the source
53939bb4 99datastore is able to deliver that performance (for example, by using SSDs).
baefbc44 100
f6226955 101LTO-9+ considerations
012c51df 102~~~~~~~~~~~~~~~~~~~~~
f6226955
DC
103
104Since LTO-9, it is necessary to initialize new media in your drives, this is
105called `Media Optimization`. This usually takes between 40 and 120 minutes per
106medium. It is recommended to initialize your media in this manner with the
107tools provided by your hardware vendor of your drive or changer. Some tape
108changers have a method to 'bulk' initialize your media.
109
110Because of this, formatting tapes is handled differently in Proxmox Backup
111Server to avoid re-optimizing on each format/labelling. If you want to format
112your media for use with the Proxmox Backup Server the first time or after use
113with another program, either use the functionality of your drive/changer, or
114use the 'slow' format on the cli:
115
116.. code-block:: console
117
118 # proxmox-tape format --drive your-drive --fast 0
119
120This will completely remove all pre-existing data and trigger a `Media
121Optimization` pass.
122
123If you format a partitioned LTO-9 medium with the 'fast' method (the default or
124by setting `--fast 1`), only the first partition will be formatted, so make
125sure to use the 'slow' method.
d5efa18a
DM
126
127Terminology
128-----------
129
10439718
DM
130**Tape Labels:**
131 are used to uniquely identify a tape. You would normally apply a
132 sticky paper label to the front of the cartridge. We additionally
133 store the label text magnetically on the tape (first file on tape).
d5efa18a
DM
134
135.. _Code 39: https://en.wikipedia.org/wiki/Code_39
136
137.. _LTO Ultrium Cartridge Label Specification: https://www.ibm.com/support/pages/ibm-lto-ultrium-cartridge-label-specification
138
8001c82e
DM
139.. _LTO Barcode Generator: lto-barcode/index.html
140
10439718
DM
141**Barcodes:**
142 are a special form of tape labels, which are electronically
143 readable. Most LTO tape robots use an 8 character string encoded as
144 `Code 39`_, as defined in the `LTO Ultrium Cartridge Label
145 Specification`_.
d5efa18a 146
10439718
DM
147 You can either buy such barcode labels from your cartridge vendor,
148 or print them yourself. You can use our `LTO Barcode Generator`_
149 app, if you would like to print them yourself.
d5efa18a 150
10439718
DM
151 .. Note:: Physical labels and the associated adhesive should have an
152 environmental performance to match or exceed the environmental
153 specifications of the cartridge to which it is applied.
d5efa18a 154
10439718
DM
155**Media Pools:**
156 A media pool is a logical container for tapes. A backup job targets
157 one media pool, so a job only uses tapes from that pool. The pool
158 additionally defines how long a backup job can append data to tapes
159 (allocation policy) and how long you want to keep the data
160 (retention policy).
08d8b2a4 161
10439718
DM
162**Media Set:**
163 A group of continuously written tapes (all from the same media pool).
d5efa18a 164
10439718
DM
165**Tape drive:**
166 The device used to read and write data to the tape. There are
167 standalone drives, but drives are usually shipped within tape
168 libraries.
d5efa18a 169
10439718
DM
170**Tape changer:**
171 A device which can change the tapes inside a tape drive (tape
172 robot). They are usually part of a tape library.
d5efa18a
DM
173
174.. _Tape Library: https://en.wikipedia.org/wiki/Tape_library
175
10439718
DM
176`Tape library`_:
177 A storage device that contains one or more tape drives, a number of
178 slots to hold tape cartridges, a barcode reader to identify tape
179 cartridges, and an automated method for loading tapes (a robot).
d5efa18a 180
10439718
DM
181 This is also commonly known as an 'autoloader', 'tape robot' or
182 'tape jukebox'.
8a192bed 183
10439718
DM
184**Inventory:**
185 The inventory stores the list of known tapes (with additional status
186 information).
4cfb1234 187
10439718
DM
188**Catalog:**
189 A media catalog stores information about the media content.
4cfb1234 190
8a192bed 191
70d00e01 192Tape Quick Start
aae5db91 193----------------
8a192bed
DM
194
1951. Configure your tape hardware (drives and changers)
196
1972. Configure one or more media pools
198
70d00e01 1993. Label your tape cartridges
8a192bed
DM
200
2014. Start your first tape backup job ...
baefbc44
DM
202
203
204Configuration
205-------------
206
207Please note that you can configure anything using the graphical user
8c83b75a 208interface or the command-line interface. Both methods result in the
baefbc44
DM
209same configuration.
210
225affc9 211.. _tape_changer_config:
baefbc44
DM
212
213Tape changers
214~~~~~~~~~~~~~
215
53939bb4 216.. image:: images/screenshots/pbs-gui-tape-changers.png
5565e454 217 :target: _images/pbs-gui-tape-changers.png
53939bb4
DW
218 :align: right
219 :alt: Tape Backup: Tape Changers
220
295bae14
TL
221Tape changers (robots) are part of a `Tape Library`_. They contain a number of
222slots to hold tape cartridges, a barcode reader to identify tape cartridges and
223an automated method for loading tapes.
224
225You can skip this step if you are using a standalone drive.
baefbc44 226
70d00e01 227Linux is able to auto detect these devices, and you can get a list
98cdee78
DM
228of available devices using:
229
230.. code-block:: console
baefbc44
DM
231
232 # proxmox-tape changer scan
a174854a
DM
233 ┌─────────────────────────────┬─────────┬──────────────┬────────┐
234 │ path │ vendor │ model │ serial │
235 ╞═════════════════════════════╪═════════╪══════════════╪════════╡
236 │ /dev/tape/by-id/scsi-CC2C52 │ Quantum │ Superloader3 │ CC2C52 │
237 └─────────────────────────────┴─────────┴──────────────┴────────┘
baefbc44 238
70d00e01 239In order to use a device with Proxmox Backup Server, you need to create a
98cdee78
DM
240configuration entry:
241
242.. code-block:: console
baefbc44 243
a174854a 244 # proxmox-tape changer create sl3 --path /dev/tape/by-id/scsi-CC2C52
baefbc44
DM
245
246Where ``sl3`` is an arbitrary name you can choose.
247
70d00e01 248.. Note:: Please use the persistent device path names from inside
baefbc44
DM
249 ``/dev/tape/by-id/``. Names like ``/dev/sg0`` may point to a
250 different device after reboot, and that is not what you want.
251
53939bb4 252.. image:: images/screenshots/pbs-gui-tape-changers-add.png
5565e454 253 :target: _images/pbs-gui-tape-changers-add.png
53939bb4
DW
254 :align: right
255 :alt: Tape Backup: Add a new tape changer
256
257This operation can also be carried out from the GUI, by navigating to the
258**Changers** tab of **Tape Backup** and clicking **Add**.
259
70d00e01 260You can display the final configuration with:
98cdee78
DM
261
262.. code-block:: console
baefbc44 263
04eba29c
DM
264 # proxmox-tape changer config sl3
265 ┌──────┬─────────────────────────────┐
266 │ Name │ Value │
267 ╞══════╪═════════════════════════════╡
268 │ name │ sl3 │
269 ├──────┼─────────────────────────────┤
270 │ path │ /dev/tape/by-id/scsi-CC2C52 │
271 └──────┴─────────────────────────────┘
272
53939bb4
DW
273Or simply list all configured changer devices (as seen in the **Changers** tab
274of the GUI):
98cdee78
DM
275
276.. code-block:: console
04eba29c 277
baefbc44 278 # proxmox-tape changer list
a174854a
DM
279 ┌──────┬─────────────────────────────┬─────────┬──────────────┬────────────┐
280 │ name │ path │ vendor │ model │ serial │
281 ╞══════╪═════════════════════════════╪═════════╪══════════════╪════════════╡
282 │ sl3 │ /dev/tape/by-id/scsi-CC2C52 │ Quantum │ Superloader3 │ CC2C52 │
283 └──────┴─────────────────────────────┴─────────┴──────────────┴────────────┘
baefbc44 284
53939bb4 285The Vendor, Model and Serial number are auto-detected, but only shown
baefbc44
DM
286if the device is online.
287
98cdee78
DM
288To test your setup, please query the status of the changer device with:
289
290.. code-block:: console
a174854a
DM
291
292 # proxmox-tape changer status sl3
293 ┌───────────────┬──────────┬────────────┬─────────────┐
294 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
295 ╞═══════════════╪══════════╪════════════╪═════════════╡
296 │ drive │ 0 │ vtape1 │ 1 │
297 ├───────────────┼──────────┼────────────┼─────────────┤
298 │ slot │ 1 │ │ │
299 ├───────────────┼──────────┼────────────┼─────────────┤
300 │ slot │ 2 │ vtape2 │ │
301 ├───────────────┼──────────┼────────────┼─────────────┤
302 │ ... │ ... │ │ │
303 ├───────────────┼──────────┼────────────┼─────────────┤
304 │ slot │ 16 │ │ │
305 └───────────────┴──────────┴────────────┴─────────────┘
306
0912878e 307Tape libraries usually provide some special import/export slots (also
02633961 308called "mail slots"). Tapes inside those slots are accessible from
0912878e
DM
309outside, making it easy to add/remove tapes to/from the library. Those
310tapes are considered to be "offline", so backup jobs will not use
70d00e01 311them. Those special slots are auto-detected and marked as an
0912878e
DM
312``import-export`` slot in the status command.
313
314It's worth noting that some of the smaller tape libraries don't have
70d00e01
DW
315such slots. While they have something called a "Mail Slot", that slot
316is just a way to grab the tape from the gripper. They are unable
0912878e 317to hold media while the robot does other things. They also do not
5f3b2330 318expose that "Mail Slot" over the SCSI interface, so you won't see them in
0912878e
DM
319the status output.
320
321As a workaround, you can mark some of the normal slots as export
322slot. The software treats those slots like real ``import-export``
53939bb4 323slots, and the media inside those slots are considered to be 'offline'
98cdee78
DM
324(not available for backup):
325
326.. code-block:: console
0912878e
DM
327
328 # proxmox-tape changer update sl3 --export-slots 15,16
329
330After that, you can see those artificial ``import-export`` slots in
98cdee78
DM
331the status output:
332
333.. code-block:: console
0912878e 334
04eba29c 335 # proxmox-tape changer status sl3
0912878e
DM
336 ┌───────────────┬──────────┬────────────┬─────────────┐
337 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
338 ╞═══════════════╪══════════╪════════════╪═════════════╡
339 │ drive │ 0 │ vtape1 │ 1 │
340 ├───────────────┼──────────┼────────────┼─────────────┤
341 │ import-export │ 15 │ │ │
342 ├───────────────┼──────────┼────────────┼─────────────┤
343 │ import-export │ 16 │ │ │
344 ├───────────────┼──────────┼────────────┼─────────────┤
345 │ slot │ 1 │ │ │
346 ├───────────────┼──────────┼────────────┼─────────────┤
347 │ slot │ 2 │ vtape2 │ │
348 ├───────────────┼──────────┼────────────┼─────────────┤
349 │ ... │ ... │ │ │
350 ├───────────────┼──────────┼────────────┼─────────────┤
351 │ slot │ 14 │ │ │
352 └───────────────┴──────────┴────────────┴─────────────┘
a174854a 353
3cca5d7f
DC
354
355Advanced options
356^^^^^^^^^^^^^^^^
357
358Since not all tape changer behave the same, there is sometimes the need
359for configuring advanced options.
360
361Currently there are the following:
362
363* `eject-before-unload` : This is needed for some changers that require a tape
364 to be ejected before unloading from the drive.
365
366You can set these options with `proxmox-tape` like this:
367
368.. code-block:: console
369
c7321e2e 370 # proxmox-tape changer update sl3 --eject-before-unload true
3cca5d7f
DC
371
372
225affc9 373.. _tape_drive_config:
baefbc44
DM
374
375Tape drives
376~~~~~~~~~~~
377
53939bb4 378.. image:: images/screenshots/pbs-gui-tape-drives.png
5565e454 379 :target: _images/pbs-gui-tape-drives.png
53939bb4
DW
380 :align: right
381 :alt: Tape Backup: Drive list
382
04eba29c 383Linux is able to auto detect tape drives, and you can get a list
98cdee78
DM
384of available tape drives using:
385
386.. code-block:: console
04eba29c
DM
387
388 # proxmox-tape drive scan
389 ┌────────────────────────────────┬────────┬─────────────┬────────┐
390 │ path │ vendor │ model │ serial │
391 ╞════════════════════════════════╪════════╪═════════════╪════════╡
ee9fa953 392 │ /dev/tape/by-id/scsi-12345-sg │ IBM │ ULT3580-TD4 │ 12345 │
04eba29c
DM
393 └────────────────────────────────┴────────┴─────────────┴────────┘
394
53939bb4 395.. image:: images/screenshots/pbs-gui-tape-drives-add.png
5565e454 396 :target: _images/pbs-gui-tape-drives-add.png
53939bb4
DW
397 :align: right
398 :alt: Tape Backup: Add a tape drive
399
04eba29c 400In order to use that drive with Proxmox, you need to create a
53939bb4
DW
401configuration entry. This can be done through **Tape Backup -> Drives** in the
402GUI or by using the command below:
98cdee78
DM
403
404.. code-block:: console
04eba29c 405
ee9fa953 406 # proxmox-tape drive create mydrive --path /dev/tape/by-id/scsi-12345-sg
04eba29c 407
70d00e01 408.. Note:: Please use the persistent device path names from inside
ee9fa953 409 ``/dev/tape/by-id/``. Names like ``/dev/sg0`` may point to a
04eba29c
DM
410 different device after reboot, and that is not what you want.
411
412If you have a tape library, you also need to set the associated
98cdee78
DM
413changer device:
414
415.. code-block:: console
04eba29c 416
627d0000 417 # proxmox-tape drive update mydrive --changer sl3 --changer-drivenum 0
04eba29c 418
627d0000 419The ``--changer-drivenum`` is only necessary if the tape library
70d00e01 420includes more than one drive (the changer status command lists all
02633961 421drive numbers).
04eba29c 422
70d00e01 423You can display the final configuration with:
98cdee78
DM
424
425.. code-block:: console
04eba29c
DM
426
427 # proxmox-tape drive config mydrive
428 ┌─────────┬────────────────────────────────┐
429 │ Name │ Value │
430 ╞═════════╪════════════════════════════════╡
431 │ name │ mydrive │
432 ├─────────┼────────────────────────────────┤
ee9fa953 433 │ path │ /dev/tape/by-id/scsi-12345-sg │
04eba29c
DM
434 ├─────────┼────────────────────────────────┤
435 │ changer │ sl3 │
436 └─────────┴────────────────────────────────┘
437
627d0000 438.. NOTE:: The ``changer-drivenum`` value 0 is not stored in the
70d00e01 439 configuration, because it is the default.
04eba29c 440
98cdee78
DM
441To list all configured drives use:
442
443.. code-block:: console
04eba29c
DM
444
445 # proxmox-tape drive list
446 ┌──────────┬────────────────────────────────┬─────────┬────────┬─────────────┬────────┐
447 │ name │ path │ changer │ vendor │ model │ serial │
448 ╞══════════╪════════════════════════════════╪═════════╪════════╪═════════════╪════════╡
ee9fa953 449 │ mydrive │ /dev/tape/by-id/scsi-12345-sg │ sl3 │ IBM │ ULT3580-TD4 │ 12345 │
04eba29c
DM
450 └──────────┴────────────────────────────────┴─────────┴────────┴─────────────┴────────┘
451
53939bb4 452The Vendor, Model and Serial number are auto detected and only shown
04eba29c
DM
453if the device is online.
454
98cdee78
DM
455For testing, you can simply query the drive status with:
456
457.. code-block:: console
632756b6
DM
458
459 # proxmox-tape status --drive mydrive
54311a38
DM
460 ┌────────────────┬──────────────────────────┐
461 │ Name │ Value │
462 ╞════════════════╪══════════════════════════╡
463 │ blocksize │ 0 │
464 ├────────────────┼──────────────────────────┤
465 │ density │ LTO4 │
466 ├────────────────┼──────────────────────────┤
467 │ compression │ 1 │
468 ├────────────────┼──────────────────────────┤
469 │ buffer-mode │ 1 │
470 ├────────────────┼──────────────────────────┤
471 │ alert-flags │ (empty) │
472 ├────────────────┼──────────────────────────┤
473 │ file-number │ 0 │
474 ├────────────────┼──────────────────────────┤
475 │ block-number │ 0 │
476 ├────────────────┼──────────────────────────┤
477 │ manufactured │ Fri Dec 13 01:00:00 2019 │
478 ├────────────────┼──────────────────────────┤
479 │ bytes-written │ 501.80 GiB │
480 ├────────────────┼──────────────────────────┤
481 │ bytes-read │ 4.00 MiB │
482 ├────────────────┼──────────────────────────┤
483 │ medium-passes │ 20 │
484 ├────────────────┼──────────────────────────┤
485 │ medium-wearout │ 0.12% │
486 ├────────────────┼──────────────────────────┤
487 │ volume-mounts │ 2 │
488 └────────────────┴──────────────────────────┘
632756b6
DM
489
490.. NOTE:: Blocksize should always be 0 (variable block size
70d00e01 491 mode). This is the default anyway.
632756b6 492
baefbc44 493
225affc9
DM
494.. _tape_media_pool_config:
495
baefbc44
DM
496Media Pools
497~~~~~~~~~~~
498
53939bb4 499.. image:: images/screenshots/pbs-gui-tape-pools.png
5565e454 500 :target: _images/pbs-gui-tape-pools.png
53939bb4
DW
501 :align: right
502 :alt: Tape Backup: Media Pools
503
08d8b2a4 504A media pool is a logical container for tapes. A backup job targets
53939bb4 505a single media pool, so a job only uses tapes from that pool.
08d8b2a4
DM
506
507.. topic:: Media Set
508
509 A media set is a group of continuously written tapes, used to split
510 the larger pool into smaller, restorable units. One or more backup
59217472 511 jobs write to a media set, producing an ordered group of
70d00e01
DW
512 tapes. Media sets are identified by a unique ID. That ID and the
513 sequence number are stored on each tape of that set (tape label).
08d8b2a4 514
70d00e01
DW
515 Media sets are the basic unit for restore tasks. This means that you need
516 every tape in the set to restore the media set contents. Data is fully
08d8b2a4
DM
517 deduplicated inside a media set.
518
519
520.. topic:: Media Set Allocation Policy
521
522 The pool additionally defines how long backup jobs can append data
59217472 523 to a media set. The following settings are possible:
08d8b2a4 524
b3bed7e4 525 - Try to use the current media set (``continue``).
08d8b2a4 526
70d00e01 527 This setting produces one large media set. While this is very
59217472 528 space efficient (deduplication, no unused space), it can lead to
70d00e01 529 long restore times, because restore jobs need to read all tapes in the
59217472 530 set.
08d8b2a4 531
70d00e01 532 .. NOTE:: Data is fully deduplicated inside a media set. This
59217472 533 also means that data is randomly distributed over the tapes in
70d00e01
DW
534 the set. Thus, even if you restore a single VM, data may have to be
535 read from all tapes inside the media set.
59217472 536
70d00e01
DW
537 Larger media sets are also more error-prone, because a single
538 damaged tape makes the restore fail.
59217472 539
70d00e01 540 Usage scenario: Mostly used with tape libraries. You manually
59217472
DM
541 trigger new set creation by running a backup job with the
542 ``--export`` option.
543
e84b801c 544 .. NOTE:: Retention period starts with the existence of a newer
02633961 545 media set.
e84b801c 546
b3bed7e4 547 - Always create a new media set (``always``).
59217472 548
70d00e01
DW
549 With this setting, each backup job creates a new media set. This
550 is less space efficient, because the media from the last set
59217472
DM
551 may not be fully written, leaving the remaining space unused.
552
b0427dda 553 The advantage is that this produces media sets of minimal
70d00e01
DW
554 size. Small sets are easier to handle, can be moved more conveniently
555 to an off-site vault, and can be restored much faster.
59217472 556
e84b801c
DM
557 .. NOTE:: Retention period starts with the creation time of the
558 media set.
559
59217472
DM
560 - Create a new set when the specified Calendar Event triggers.
561
59217472
DM
562 This allows you to specify points in time by using systemd like
563 Calendar Event specifications (see `systemd.time manpage`_).
564
565 For example, the value ``weekly`` (or ``Mon *-*-* 00:00:00``)
566 will create a new set each week.
567
02633961 568 This balances between space efficiency and media count.
08d8b2a4 569
83b5076d
DC
570 .. NOTE:: Retention period starts on the creation time of the next
571 media-set or, if that does not exist, when the calendar event
6481fd24 572 next triggers after the current media-set start time.
e84b801c 573
08d8b2a4
DM
574 Additionally, the following events may allocate a new media set:
575
59217472 576 - Required tape is offline (and you use a tape library).
08d8b2a4 577
3f4a62de 578 - Current set contains damaged or retired tapes.
08d8b2a4 579
70d00e01 580 - Media pool encryption has changed
6dd05135 581
70d00e01
DW
582 - Database consistency errors, for example, if the inventory does not
583 contain the required media information, or it contains conflicting
584 information (outdated data).
08d8b2a4
DM
585
586.. topic:: Retention Policy
587
e84b801c 588 Defines how long we want to keep the data.
08d8b2a4 589
3838ce33
DM
590 - Always overwrite media.
591
592 - Protect data for the duration specified.
593
594 We use systemd like time spans to specify durations, e.g. ``2
595 weeks`` (see `systemd.time manpage`_).
596
597 - Never overwrite data.
08d8b2a4 598
794b0fe9
DM
599.. topic:: Hardware Encryption
600
70d00e01 601 LTO-4 (or later) tape drives support hardware encryption. If you
794b0fe9
DM
602 configure the media pool to use encryption, all data written to the
603 tapes is encrypted using the configured key.
604
70d00e01
DW
605 This way, unauthorized users cannot read data from the media,
606 for example, if you loose a tape while shipping to an offsite location.
794b0fe9 607
70d00e01 608 .. Note:: If the backup client also encrypts data, data on the tape
794b0fe9
DM
609 will be double encrypted.
610
70d00e01 611 The password protected key is stored on each medium, so that it is
9aa8df5b 612 possible to `restore the key <tape_restore_encryption_key_>`_ using
70d00e01
DW
613 the password. Please make sure to remember the password, in case
614 you need to restore the key.
794b0fe9 615
53939bb4 616.. image:: images/screenshots/pbs-gui-tape-pools-add.png
5565e454 617 :target: _images/pbs-gui-tape-pools-add.png
53939bb4
DW
618 :align: right
619 :alt: Tape Backup: Add a media pool
08d8b2a4 620
53939bb4
DW
621To create a new media pool, add one from **Tape Backup -> Media Pools** in the
622GUI, or enter the following command:
98cdee78
DM
623
624.. code-block:: console
0bce2118
DM
625
626 // proxmox-tape pool create <name> --drive <string> [OPTIONS]
627
628 # proxmox-tape pool create daily --drive mydrive
629
08d8b2a4 630
53939bb4 631Additional options can be set later, using the update command:
98cdee78
DM
632
633.. code-block:: console
08d8b2a4 634
0bce2118
DM
635 # proxmox-tape pool update daily --allocation daily --retention 7days
636
637
98cdee78
DM
638To list all configured pools use:
639
640.. code-block:: console
0bce2118
DM
641
642 # proxmox-tape pool list
643 ┌───────┬──────────┬────────────┬───────────┬──────────┐
644 │ name │ drive │ allocation │ retention │ template │
645 ╞═══════╪══════════╪════════════╪═══════════╪══════════╡
646 │ daily │ mydrive │ daily │ 7days │ │
647 └───────┴──────────┴────────────┴───────────┴──────────┘
08d8b2a4 648
225affc9 649.. _tape_backup_job_config:
baefbc44 650
9cf45049
DM
651Tape Backup Jobs
652~~~~~~~~~~~~~~~~
653
53939bb4 654.. image:: images/screenshots/pbs-gui-tape-backup-jobs.png
5565e454 655 :target: _images/pbs-gui-tape-backup-jobs.png
53939bb4
DW
656 :align: right
657 :alt: Tape Backup: Tape Backup Jobs
658
9cf45049 659To automate tape backup, you can configure tape backup jobs which
70d00e01
DW
660write datastore content to a media pool, based on a specific time schedule.
661The required settings are:
9cf45049
DM
662
663- ``store``: The datastore you want to backup
664
665- ``pool``: The media pool - only tape cartridges from that pool are
666 used.
667
668- ``drive``: The tape drive.
669
670- ``schedule``: Job schedule (see :ref:`calendar-event-scheduling`)
671
672For example, to configure a tape backup job for datastore ``vmstore1``
673use:
674
675.. code-block:: console
676
677 # proxmox-tape backup-job create job2 --store vmstore1 \
678 --pool yourpool --drive yourdrive --schedule daily
679
70d00e01 680The backup includes all snapshots from a backup group by default. You can
9cf45049
DM
681set the ``latest-only`` flag to include only the latest snapshots:
682
683.. code-block:: console
684
685 # proxmox-tape backup-job update job2 --latest-only
686
70d00e01 687Backup jobs can use email to send tape request notifications or
9cf45049
DM
688report errors. You can set the notification user with:
689
690.. code-block:: console
691
692 # proxmox-tape backup-job update job2 --notify-user root@pam
693
694.. Note:: The email address is a property of the user (see :ref:`user_mgmt`).
695
696It is sometimes useful to eject the tape from the drive after a
70d00e01 697backup. For a standalone drive, the ``eject-media`` option ejects the
9cf45049
DM
698tape, making sure that the following backup cannot use the tape
699(unless someone manually loads the tape again). For tape libraries,
700this option unloads the tape to a free slot, which provides better
701dust protection than inside a drive:
702
703.. code-block:: console
704
705 # proxmox-tape backup-job update job2 --eject-media
706
70d00e01 707.. Note:: For failed jobs, the tape remains in the drive.
9cf45049 708
5f9bdaec 709For tape libraries, the ``export-media-set`` option moves all tapes from
9cf45049 710the media set to an export slot, making sure that the following backup
70d00e01 711cannot use the tapes. An operator can pick up those tapes and move them
9cf45049
DM
712to a vault.
713
714.. code-block:: console
715
5f9bdaec 716 # proxmox-tape backup-job update job2 --export-media-set
9cf45049 717
5f9bdaec 718.. Note:: The ``export-media-set`` option can be used to force the start
9cf45049
DM
719 of a new media set, because tapes from the current set are no
720 longer online.
721
722It is also possible to run backup jobs manually:
723
724.. code-block:: console
725
726 # proxmox-tape backup-job run job2
727
728To remove a job, please use:
729
730.. code-block:: console
731
732 # proxmox-tape backup-job remove job2
baefbc44 733
74391d1c 734By default, all (recursive) namespaces of the datastore are included in a tape
e87e4499 735backup. You can specify a single namespace with ``ns`` and a depth with
74391d1c
DC
736``max-depth``. For example:
737
738.. code-block:: console
739
740 # proxmox-tape backup-job update job2 --ns mynamespace --max-depth 3
741
742If no `max-depth` is given, it will include all recursive namespaces.
743
53939bb4 744.. image:: images/screenshots/pbs-gui-tape-backup-jobs-add.png
5565e454 745 :target: _images/pbs-gui-tape-backup-jobs-add.png
53939bb4
DW
746 :align: right
747 :alt: Tape Backup: Add a backup job
748
749This same functionality also exists in the GUI, under the **Backup Jobs** tab of
750**Tape Backup**, where *Local Datastore* relates to the datastore you want to
751backup and *Media Pool* is the pool to back up to.
752
baefbc44
DM
753
754Administration
755--------------
756
8c83b75a 757Many sub-commands of the ``proxmox-tape`` command-line tools take a
44ce25e7 758parameter called ``--drive``, which specifies the tape drive you want
70d00e01 759to work on. For convenience, you can set this in an environment
98cdee78
DM
760variable:
761
762.. code-block:: console
44ce25e7
DM
763
764 # export PROXMOX_TAPE_DRIVE=mydrive
765
766You can then omit the ``--drive`` parameter from the command. If the
767drive has an associated changer device, you may also omit the changer
53939bb4 768parameter from commands that need a changer device, for example:
98cdee78
DM
769
770.. code-block:: console
44ce25e7
DM
771
772 # proxmox-tape changer status
773
70d00e01 774should display the changer status of the changer device associated with
44ce25e7
DM
775drive ``mydrive``.
776
777
baefbc44
DM
778Label Tapes
779~~~~~~~~~~~
780
70d00e01
DW
781By default, tape cartridges all look the same, so you need to put a
782label on them for unique identification. First, put a sticky paper
8001c82e
DM
783label with some human readable text on the cartridge.
784
785If you use a `Tape Library`_, you should use an 8 character string
70d00e01
DW
786encoded as `Code 39`_, as defined in the `LTO Ultrium Cartridge Label
787Specification`_. You can either buy such barcode labels from your
788cartridge vendor, or print them yourself. You can use our `LTO Barcode
789Generator`_ app to print them.
8001c82e
DM
790
791Next, you need to write that same label text to the tape, so that the
792software can uniquely identify the tape too.
793
70d00e01 794For a standalone drive, manually insert the new tape cartridge into the
98cdee78
DM
795drive and run:
796
797.. code-block:: console
8001c82e 798
0bce2118
DM
799 # proxmox-tape label --changer-id <label-text> [--pool <pool-name>]
800
801You may omit the ``--pool`` argument to allow the tape to be used by any pool.
8001c82e 802
70d00e01 803.. Note:: For safety reasons, this command fails if the tape contains
02633961 804 any data. If you want to overwrite it anyway, erase the tape first.
8001c82e 805
98cdee78
DM
806You can verify success by reading back the label:
807
808.. code-block:: console
8001c82e 809
0bce2118
DM
810 # proxmox-tape read-label
811 ┌─────────────────┬──────────────────────────────────────┐
812 │ Name │ Value │
813 ╞═════════════════╪══════════════════════════════════════╡
814 │ changer-id │ vtape1 │
815 ├─────────────────┼──────────────────────────────────────┤
816 │ uuid │ 7f42c4dd-9626-4d89-9f2b-c7bc6da7d533 │
817 ├─────────────────┼──────────────────────────────────────┤
818 │ ctime │ Wed Jan 6 09:07:51 2021 │
819 ├─────────────────┼──────────────────────────────────────┤
820 │ pool │ daily │
821 ├─────────────────┼──────────────────────────────────────┤
822 │ media-set-uuid │ 00000000-0000-0000-0000-000000000000 │
823 ├─────────────────┼──────────────────────────────────────┤
824 │ media-set-ctime │ Wed Jan 6 09:07:51 2021 │
825 └─────────────────┴──────────────────────────────────────┘
826
827.. NOTE:: The ``media-set-uuid`` using all zeros indicates an empty
828 tape (not used by any media set).
8001c82e
DM
829
830If you have a tape library, apply the sticky barcode label to the tape
831cartridges first. Then load those empty tapes into the library. You
98cdee78
DM
832can then label all unlabeled tapes with a single command:
833
834.. code-block:: console
8001c82e 835
0bce2118 836 # proxmox-tape barcode-label [--pool <pool-name>]
8001c82e
DM
837
838
baefbc44
DM
839Run Tape Backups
840~~~~~~~~~~~~~~~~
841
53939bb4 842To manually run a backup job click *Run Now* in the GUI or use the command:
98cdee78
DM
843
844.. code-block:: console
9738dd54
DM
845
846 # proxmox-tape backup <store> <pool> [OPTIONS]
847
848The following options are available:
849
850--eject-media Eject media upon job completion.
851
852 It is normally good practice to eject the tape after use. This unmounts the
70d00e01 853 tape from the drive and prevents the tape from getting dusty.
9738dd54
DM
854
855--export-media-set Export media set upon job completion.
856
02633961 857 After a successful backup job, this moves all tapes from the used
9738dd54
DM
858 media set into import-export slots. The operator can then pick up
859 those tapes and move them to a media vault.
860
74391d1c
DC
861--ns The namespace to backup.
862
6481fd24
DW
863 Used if you only want to backup a specific namespace. If omitted, the root
864 namespace is assumed.
74391d1c
DC
865
866--max-depth The depth to recurse namespaces.
867
868 ``0`` means no recursion at all (only the given namespace). If omitted,
6481fd24 869 all namespaces are recursed (below the given one).
74391d1c 870
9738dd54 871
baefbc44
DM
872Restore from Tape
873~~~~~~~~~~~~~~~~~
874
4cfb1234
DM
875Restore is done at media-set granularity, so you first need to find
876out which media set contains the data you want to restore. This
877information is stored in the media catalog. If you do not have media
878catalogs, you need to restore them first. Please note that you need
879the catalog to find your data, but restoring a complete media-set does
880not need media catalogs.
881
70d00e01 882The following command lists the media content (from catalog):
98cdee78
DM
883
884.. code-block:: console
4cfb1234
DM
885
886 # proxmox-tape media content
887 ┌────────────┬──────┬──────────────────────────┬────────┬────────────────────────────────┬──────────────────────────────────────┐
888 │ label-text │ pool │ media-set-name │ seq-nr │ snapshot │ media-set-uuid │
889 ╞════════════╪══════╪══════════════════════════╪════════╪════════════════════════════════╪══════════════════════════════════════╡
890 │ TEST01L8 │ p2 │ Wed Jan 13 13:55:55 2021 │ 0 │ vm/201/2021-01-11T10:43:48Z │ 9da37a55-aac7-4deb-91c6-482b3b675f30 │
891 ├────────────┼──────┼──────────────────────────┼────────┼────────────────────────────────┼──────────────────────────────────────┤
892 │ ... │ ... │ ... │ ... │ ... │ ... │
893 └────────────┴──────┴──────────────────────────┴────────┴────────────────────────────────┴──────────────────────────────────────┘
894
895
896A restore job reads the data from the media set and moves it back to
98cdee78
DM
897data disk (datastore):
898
899.. code-block:: console
4cfb1234
DM
900
901 // proxmox-tape restore <media-set-uuid> <datastore>
902
903 # proxmox-tape restore 9da37a55-aac7-4deb-91c6-482b3b675f30 mystore
904
fca84a4b
DC
905Single Snapshot Restore
906^^^^^^^^^^^^^^^^^^^^^^^
907
6481fd24
DW
908Sometimes it is not necessary to restore an entire media-set, but only some
909specific snapshots from the tape. This can be achieved with the ``snapshots``
fca84a4b
DC
910parameter:
911
912
913.. code-block:: console
914
915 // proxmox-tape restore <media-set-uuid> <datastore> [<snapshot>]
916
917 # proxmox-tape restore 9da37a55-aac7-4deb-91c6-482b3b675f30 mystore sourcestore:host/hostname/2022-01-01T00:01:00Z
918
919This first restores the snapshot to a temporary location, then restores the relevant
920chunk archives, and finally restores the snapshot data to the target datastore.
921
6481fd24 922The ``snapshot`` parameter can be passed multiple times, in order to restore
fca84a4b
DC
923multiple snapshots with one restore action.
924
925.. NOTE:: When using the single snapshot restore, the tape must be traversed
926 more than once, which, if you restore many snapshots at once, can take longer
927 than restoring the whole datastore.
4cfb1234 928
74391d1c
DC
929Namespaces
930^^^^^^^^^^
931
932It is also possible to select and map specific namespaces from a media-set
933during a restore. This is possible with the ``namespaces`` parameter.
6481fd24 934The format for the parameter is:
74391d1c
DC
935
936.. code-block:: console
937
938 store=<source-datastore>[,source=<source-ns>][,target=<target-ns>][,max-depth=<depth>]
939
940If ``source`` or ``target`` is not given, the root namespace is assumed.
941When no ``max-depth`` is given, the source namespace will be fully recursed.
942
943An example restore command:
944
945.. code-block:: console
946
947 # proxmox-tape restore 9da37a55-aac7-4deb-91c6-482b3b675f30 mystore --namespaces store=sourcedatastore,source=ns1,target=ns2,max-depth=2
948
949The parameter can be given multiple times. It can also be combined with the
950``snapshots`` parameter to only restore those snapshots and map them to different
951namespaces.
952
baefbc44
DM
953Update Inventory
954~~~~~~~~~~~~~~~~
955
4cfb1234 956
baefbc44
DM
957Restore Catalog
958~~~~~~~~~~~~~~~
9738dd54 959
a5f30a56
DC
960To restore a catalog from an existing tape, just insert the tape into the drive
961and execute:
962
963.. code-block:: console
964
965 # proxmox-tape catalog
966
967
968You can restore from a tape even without an existing catalog, but only the
969whole media set. If you do this, the catalog will be automatically created.
970
4cfb1234 971
794b0fe9
DM
972Encryption Key Management
973~~~~~~~~~~~~~~~~~~~~~~~~~
974
53939bb4 975.. image:: images/screenshots/pbs-gui-tape-crypt-keys.png
5565e454 976 :target: _images/pbs-gui-tape-crypt-keys.png
53939bb4
DW
977 :align: right
978 :alt: Tape Backup: Encryption Keys
979
980Proxmox Backup Server also provides an interface for handling encryption keys on
981the backup server. Encryption keys can be managed from the **Tape Backup ->
8c83b75a
NU
982Encryption Keys** section of the GUI or through the ``proxmox-tape key``
983command-line tool. To create a new encryption key from the command line:
98cdee78
DM
984
985.. code-block:: console
794b0fe9
DM
986
987 # proxmox-tape key create --hint "tape pw 2020"
988 Tape Encryption Key Password: **********
989 Verify Password: **********
990 "14:f8:79:b9:f5:13:e5:dc:bf:b6:f9:88:48:51:81:dc:79:bf:a0:22:68:47:d1:73:35:2d:b6:20:e1:7f:f5:0f"
991
98cdee78
DM
992List existing encryption keys:
993
994.. code-block:: console
794b0fe9
DM
995
996 # proxmox-tape key list
997 ┌───────────────────────────────────────────────────┬───────────────┐
998 │ fingerprint │ hint │
999 ╞═══════════════════════════════════════════════════╪═══════════════╡
1000 │ 14:f8:79:b9:f5:13:e5:dc: ... :b6:20:e1:7f:f5:0f │ tape pw 2020 │
1001 └───────────────────────────────────────────────────┴───────────────┘
1002
98cdee78
DM
1003To show encryption key details:
1004
1005.. code-block:: console
794b0fe9
DM
1006
1007 # proxmox-tape key show 14:f8:79:b9:f5:13:e5:dc:...:b6:20:e1:7f:f5:0f
1008 ┌─────────────┬───────────────────────────────────────────────┐
1009 │ Name │ Value │
1010 ╞═════════════╪═══════════════════════════════════════════════╡
1011 │ kdf │ scrypt │
1012 ├─────────────┼───────────────────────────────────────────────┤
1013 │ created │ Sat Jan 23 14:47:21 2021 │
1014 ├─────────────┼───────────────────────────────────────────────┤
1015 │ modified │ Sat Jan 23 14:47:21 2021 │
1016 ├─────────────┼───────────────────────────────────────────────┤
1017 │ fingerprint │ 14:f8:79:b9:f5:13:e5:dc:...:b6:20:e1:7f:f5:0f │
1018 ├─────────────┼───────────────────────────────────────────────┤
1019 │ hint │ tape pw 2020 │
1020 └─────────────┴───────────────────────────────────────────────┘
1021
8ba47929
DM
1022The ``paperkey`` subcommand can be used to create a QR encoded
1023version of a tape encryption key. The following command sends the output of the
98cdee78
DM
1024``paperkey`` command to a text file, for easy printing:
1025
1026.. code-block:: console
8ba47929
DM
1027
1028 proxmox-tape key paperkey <fingerprint> --output-format text > qrkey.txt
1029
1030
225affc9 1031.. _tape_restore_encryption_key:
794b0fe9
DM
1032
1033Restoring Encryption Keys
1034^^^^^^^^^^^^^^^^^^^^^^^^^
1035
1036You can restore the encryption key from the tape, using the password
1037used to generate the key. First, load the tape you want to restore
98cdee78
DM
1038into the drive. Then run:
1039
1040.. code-block:: console
794b0fe9
DM
1041
1042 # proxmox-tape key restore
9aa8df5b 1043 Tape Encryption Key Password: ***********
794b0fe9
DM
1044
1045If the password is correct, the key will get imported to the
02633961 1046database. Further restore jobs automatically use any available key.
794b0fe9 1047
4cfb1234 1048
9738dd54
DM
1049Tape Cleaning
1050~~~~~~~~~~~~~
1051
70d00e01 1052LTO tape drives require regular cleaning. This is done by loading a
9738dd54
DM
1053cleaning cartridge into the drive, which is a manual task for
1054standalone drives.
1055
1056For tape libraries, cleaning cartridges are identified using special
1057labels starting with letters "CLN". For example, our tape library has a
98cdee78
DM
1058cleaning cartridge inside slot 3:
1059
1060.. code-block:: console
9738dd54
DM
1061
1062 # proxmox-tape changer status sl3
1063 ┌───────────────┬──────────┬────────────┬─────────────┐
1064 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
1065 ╞═══════════════╪══════════╪════════════╪═════════════╡
1066 │ drive │ 0 │ vtape1 │ 1 │
1067 ├───────────────┼──────────┼────────────┼─────────────┤
1068 │ slot │ 1 │ │ │
1069 ├───────────────┼──────────┼────────────┼─────────────┤
1070 │ slot │ 2 │ vtape2 │ │
1071 ├───────────────┼──────────┼────────────┼─────────────┤
1072 │ slot │ 3 │ CLN001CU │ │
1073 ├───────────────┼──────────┼────────────┼─────────────┤
1074 │ ... │ ... │ │ │
1075 └───────────────┴──────────┴────────────┴─────────────┘
1076
98cdee78
DM
1077To initiate a cleaning operation simply run:
1078
1079.. code-block:: console
9738dd54
DM
1080
1081 # proxmox-tape clean
1082
1083This command does the following:
1084
1085- find the cleaning tape (in slot 3)
1086
70d00e01 1087- unload the current media from the drive (back to slot 1)
9738dd54
DM
1088
1089- load the cleaning tape into the drive
1090
1091- run drive cleaning operation
1092
1093- unload the cleaning tape (to slot 3)
9c96e536 1094
59efe20b
DC
1095WORM Tapes
1096----------
1097
48f37f48
AL
1098WORM (write once, read many) tapes are special cartridges that cannot be
1099deleted or overwritten. This may be useful for legal or protection purposes.
59efe20b 1100
48f37f48
AL
1101If you want to use them, you must use a media pool with a retention policy of
1102`keep`. Otherwise, a backup job can fail when it tries to erase or overwrite
1103the tape.
1104
1105Proxmox Backup Server makes no distinction between normal and WORM tapes. To
1106avoid confusion, use a different naming scheme for WORM backups and use
1107dedicated media pools for them. Do not mix WORM and non-WORM tapes in the same
1108media pool.
59efe20b 1109
59efe20b 1110
9c96e536
DC
1111Example Setups
1112--------------
1113
6481fd24 1114Here are a few example setups for managing media pools and schedules.
9c96e536
DC
1115This is not an exhaustive list, and there are many more possible combinations
1116of useful settings.
1117
bd030091
DC
1118Single Continued Media Set
1119~~~~~~~~~~~~~~~~~~~~~~~~~~
9c96e536 1120
bd030091 1121The most simple setup: always continue the media-set and never expire.
9c96e536
DC
1122
1123Allocation policy:
1124 continue
1125
1126Retention policy:
1127 keep
1128
6481fd24
DW
1129This setup has the advantage of being easy to manage and reuses the benefits
1130from deduplication as much as possible. But, it also provides no redundancy,
1131meaning a failure of any single tape would render all backups referring to
1132chunks from that tape unusable.
bd030091
DC
1133
1134If you want to start a new media-set manually, you can set the currently
1135writable media of the set either to 'full', or set the location to an
6481fd24 1136off-site vault.
9c96e536
DC
1137
1138Weekday Scheme
1139~~~~~~~~~~~~~~
1140
bd030091
DC
1141A slightly more complex scheme, where the goal is to have an independent
1142tape or media set for each weekday, for example from Monday to Friday.
1143This can be solved by having a separate media pool for each day, so 'Monday',
1144'Tuesday', etc.
9c96e536
DC
1145
1146Allocation policy:
1147 should be 'mon' for the 'Monday' pool, 'tue' for the Tuesday pool and so on.
1148
1149Retention policy:
1150 overwrite
1151
6481fd24 1152There should be one or more tape-backup jobs for each pool on the corresponding
bd030091 1153weekday. This scheme is still very manageable with one media set per weekday,
6481fd24 1154and could be moved off-site easily.
9c96e536 1155
eb080f36 1156Multiple Pools with Different Policies
bd030091 1157~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9c96e536 1158
6481fd24 1159Complex setups are also possible, with multiple media pools configured with
9c96e536
DC
1160different allocation and retention policies.
1161
eb080f36
TL
1162An example would be to have two media pools. The first configured with weekly
1163allocation and a few weeks of retention:
9c96e536
DC
1164
1165Allocation policy:
1166 mon
1167
1168Retention policy:
1169 3 weeks
1170
6481fd24 1171The second pool configured with yearly allocation that does not expire:
9c96e536
DC
1172
1173Allocation policy:
1174 yearly
1175
1176Retention policy:
1177 keep
1178
6481fd24
DW
1179In combination with fitting prune settings and tape backup schedules, this
1180achieves long-term storage of some backups, while keeping the recent
1181backups on smaller media sets that expire roughly every 4 weeks (that is, three
1182plus the current week).