]> git.proxmox.com Git - proxmox-backup.git/blame - docs/tape-backup.rst
tape: add command to read cartridge memory (MAM)
[proxmox-backup.git] / docs / tape-backup.rst
CommitLineData
5f79dc28
DM
1Tape Backup
2===========
3
4Our tape backup solution provides a easy way to store datastore
5contents on a tape. This increases data safety because you get:
6
7- an additional copy of the data
8- to a different media type (tape)
9- to an additional location (you can move tape offsite)
10
11Tape backups do not provide random access to the stored
12data. Instead, you need to restore the data to disk before you can
13access it again.
14
15
16Tape Technology Primer
17----------------------
18
19.. _Linear Tape Open: https://en.wikipedia.org/wiki/Linear_Tape-Open
20
21As of 2021, the only broadly available tape technology standard is
22`Linear Tape Open`_, and different vendors offers LTO Ultrium tape
23drives and autoloaders.
24
25In general, LTO tapes offer the following advantages:
26
27- Durable (30 years)
28- High Capacity (12 TB)
29- Relatively low cost per TB
30- Cold Media
31- Movable (storable inside vault)
32- Multiple vendors (for both media and drives)
d5efa18a
DM
33
34
35Supported Hardware
36------------------
37
38Proxmox Backup Server supports `Linear Tape Open`_ genertion 3
39(LTO3) or later. In general, all SCSI2 tape drives supported by
40the Linux kernel should work.
41
42Tape changer support is done using the Linux 'mtx' command line
43tool. So any changer devive supported by that tool work work.
44
45
8a192bed
DM
46Drive Performance
47~~~~~~~~~~~~~~~~~
48
49Current LTO8 tapes provide read/write speeds up to 360MB/s. Please
50note that it still takes a minimum of 9 hours to completely write or
51read a single tape (even at maximum speed).
52
53The only way to speed up that data rate is to use more than one
54drive. That way you can run several backup jobs in parallel, or run
55restore jobs while the other dives are used for backups.
56
baefbc44
DM
57Also consider that you need to read data first from your datastore
58(disk). But a single spinning disk is unable to deliver data at this
59rate. We meassured a maximum rate about 100MB/s in practive, so it
60takes 33 hours to read 12TB to fill up a LTO8 tape. So if you want to
61run your tape at full speed, please make sure that the source
62datastore is able to delive that performance (use SSDs).
63
d5efa18a
DM
64
65Terminology
66-----------
67
68:Tape Labels: are used to uniquely indentify a tape. You normally use
69 some sticky paper labels and apply them on the front of the
70 cartridge. We additionally store the label text magnetically on the
71 tape (first file on tape).
72
73.. _Code 39: https://en.wikipedia.org/wiki/Code_39
74
75.. _LTO Ultrium Cartridge Label Specification: https://www.ibm.com/support/pages/ibm-lto-ultrium-cartridge-label-specification
76
8001c82e
DM
77.. _LTO Barcode Generator: lto-barcode/index.html
78
d5efa18a
DM
79:Barcodes: are a special form of tape labels, which are electronically
80 readable. Most LTO tape robots use an 8 character string encoded as
81 `Code 39`_, as definded in the `LTO Ultrium Cartridge Label
82 Specification`_.
83
84 You can either bye such barcode labels from your cartidge vendor,
8001c82e
DM
85 or print them yourself. You can use our `LTO Barcode Generator`_ App
86 for that.
d5efa18a
DM
87
88.. Note:: Physical labels and the associated adhesive shall have an
89 environmental performance to match or exceed the environmental
90 specifications of the cartridge to which it is applied.
91
92:Media Pools: A media pool is a logical container for tapes. A backup
93 job targets one media pool, so a job only uses tapes from that
94 pool. The pool aditionally defines how long we can append data to a
95 tape (allocation policy), and how long we want to keep that data
96 (retention policy).
97
98:Tape drive: The decive used to read and write data to the tape. There
99 are standalone drives, but drives often ship within tape libraries.
100
101:Tape changer: A device which can change the tapes inside a tape drive
102 (tape robot). They are usually part of a tape library.
103
104.. _Tape Library: https://en.wikipedia.org/wiki/Tape_library
105
106:`Tape library`_: A storage device that contains one or more tape drives,
107 a number of slots to hold tape cartridges, a barcode reader to
108 identify tape cartridges and an automated method for loading tapes
109 (a robot).
110
111 People als call this 'autoloader', 'tape robot' or 'tape jukebox'.
8a192bed
DM
112
113
114Tape Quickstart
115---------------
116
1171. Configure your tape hardware (drives and changers)
118
1192. Configure one or more media pools
120
1213. Label your tape cartridges.
122
1234. Start your first tape backup job ...
baefbc44
DM
124
125
126Configuration
127-------------
128
129Please note that you can configure anything using the graphical user
130interface or the command line interface. Both methods results in the
131same configuration.
132
133
134Tape changers
135~~~~~~~~~~~~~
136
137Tape changers (robots) are part of a `Tape Library`_. You can skip
138this step if you are using a standalone drive.
139
140Linux is able to auto detect those devices, and you can get a list
141of available devices using:
142
143 # proxmox-tape changer scan
144
145In order to use that device with Proxmox, you need to create a
146configuration entry:
147
148 # proxmox-tape changer create sl3 --path /dev/tape/by-id/scsi-CJ0JBE0059
149
150Where ``sl3`` is an arbitrary name you can choose.
151
152.. Note:: Please use stable device names from inside
153 ``/dev/tape/by-id/``. Names like ``/dev/sg0`` may point to a
154 different device after reboot, and that is not what you want.
155
156You can show the final configuration with:
157
158 # proxmox-tape changer list
159
160The Vendor, Model and Serial number are auto detected, but only shown
161if the device is online.
162
163
164Tape drives
165~~~~~~~~~~~
166
167
168Media Pools
169~~~~~~~~~~~
170
171
172Tape Jobs
173~~~~~~~~~
174
175
176Administration
177--------------
178
179Label Tapes
180~~~~~~~~~~~
181
8001c82e
DM
182By default, tape cartidges all looks the same, so you need to put a
183label on them for unique identification. So first, put a sticky paper
184label with some human readable text on the cartridge.
185
186If you use a `Tape Library`_, you should use an 8 character string
187encoded as `Code 39`_, as definded in the `LTO Ultrium Cartridge Label
188Specification`_. You can either bye such barcode labels from your
189cartidge vendor, or print them yourself. You can use our `LTO Barcode
190Generator`_ App for that.
191
192Next, you need to write that same label text to the tape, so that the
193software can uniquely identify the tape too.
194
195For a standalone drive, manually insert the new tape cartidge into the
196drive and run:
197
198 # proxmox-tape label --changer-id <label-text> --drive <drive-name>
199
200.. Note:: For safety reasons, this command fails if the tape contain
201 any data. If you want to overwrite it anways, erase the tape first.
202
203You can verify success by reading back the label:
204
205 # proxmox-tape read-label --drive <drive-name>
206
207If you have a tape library, apply the sticky barcode label to the tape
208cartridges first. Then load those empty tapes into the library. You
209can then label all unlabeled tapes with a single command:
210
211 # proxmox-tape barcode-label --drive <drive-name>
212
213
baefbc44
DM
214Run Tape Backups
215~~~~~~~~~~~~~~~~
216
217Restore from Tape
218~~~~~~~~~~~~~~~~~
219
220Update Inventory
221~~~~~~~~~~~~~~~~
222
223Restore Catalog
224~~~~~~~~~~~~~~~