]> git.proxmox.com Git - pve-docs.git/blob - pve-storage-pbs.adoc
1bb0721f74f62a76055474f12956cc9bce46e0d9
[pve-docs.git] / pve-storage-pbs.adoc
1 [[storage_pbs]]
2 Proxmox Backup Server
3 ---------------------
4 ifdef::wiki[]
5 :pve-toplevel:
6 :title: Storage: Proxmox Backup Server
7 endif::wiki[]
8
9 Storage pool type: `pbs`
10
11 This backend allows direct integration of a Proxmox Backup Server into {pve}
12 like any other storage.
13 A Proxmox Backup storage can be added directly through the {pve} API, CLI or
14 the webinterface.
15
16 Configuration
17 ~~~~~~~~~~~~~
18
19 The backend supports all common storage properties, except the shared flag,
20 which is always set. Additionally, the following special properties to Proxmox
21 Backup Server are available:
22
23 server::
24
25 Server IP or DNS name. Required.
26
27 username::
28
29 The username for the Proxmox Backup Server storage. Required.
30
31 TIP: Do not forget to add the realm to the username. For example, `root@pam` or
32 `archiver@pbs`.
33
34 password::
35
36 The user password. The value will be saved in a file under
37 `/etc/pve/priv/storage/<STORAGE-ID>.pw` with access restricted to the root
38 user. Required.
39
40 datastore::
41
42 The ID of the Proxmox Backup Server datastore to use. Required.
43
44 fingerprint::
45
46 The fingerprint of the Proxmox Backup Server API TLS certificate. You can get
47 it in the Servers Dashboard or using the `proxmox-backup-manager cert info`
48 command. Required for self-signed certificates or any other one where the host
49 does not trusts the servers CA.
50
51 encryption-key::
52
53 A key to encrypt the backup data from the client side. Currently only
54 non-password protected (no key derive function (kdf)) are supported. Will be
55 saved in a file under `/etc/pve/priv/storage/<STORAGE-ID>.enc` with access
56 restricted to the root user. Use the magic value `autogen` to automatically
57 generate a new one using `proxmox-backup-client key create --kdf none <path>`.
58 Optional.
59
60 .Configuration Example (`/etc/pve/storage.cfg`)
61 ----
62 pbs: backup
63 datastore main
64 server enya.proxmox.com
65 content backup
66 fingerprint 09:54:ef:..snip..:88:af:47:fe:4c:3b:cf:8b:26:88:0b:4e:3c:b2
67 maxfiles 0
68 username archiver@pbs
69 ----
70
71 Storage Features
72 ~~~~~~~~~~~~~~~~
73
74 Proxmox Backup Server only supports backups, they can be block-level or
75 file-level based. {pve} uses block-level for virtual machines and file-level for
76 container.
77
78 .Storage features for backend `cifs`
79 [width="100%",cols="m,4*d",options="header"]
80 |===============================================================
81 |Content types |Image formats |Shared |Snapshots |Clones
82 |backup |n/a |yes |n/a |n/a
83 |===============================================================
84
85 [[storage_pbs_encryption]]
86 Encryption
87 ~~~~~~~~~~
88
89 Optionally, you can configure client-side encryption with AES-256 in GCM mode.
90 Encryption can be configured either via the web interface, or on the CLI with
91 the `encryption-key` option (see above). The key will be saved in the file
92 `/etc/pve/priv/storage/<STORAGE-ID>.enc`, which is only accessible by the root
93 user.
94
95 WARNING: Without their key, backups will be inaccessible. Thus, you should
96 keep keys ordered and in a place that is separate from the contents being
97 backed up. It can happen, for example, that you back up an entire system, using
98 a key on that system. If the system then becomes inaccessible for any reason
99 and needs to be restored, this will not be possible as the encryption key will be
100 lost along with the broken system.
101
102 It is recommended that you keep your keys safe, but easily accessible, in
103 order for quick disaster recovery. For this reason, the best place to store it
104 is in your password manager, where it is immediately recoverable. As a backup to
105 this, you should also save the key to a USB drive and store that in a secure
106 place. This way, it is detached from any system, but is still easy to recover
107 from, in case of emergency. Finally, in preparation for the worst case scenario,
108 you should also consider keeping a paper copy of your master key locked away in
109 a safe place. The `paperkey` subcommand can be used to create a QR encoded
110 version of your master key. The following command sends the output of the
111 `paperkey` command to a text file, for easy printing.
112
113 ----
114 # proxmox-backup-client key paperkey --output-format text > qrkey.txt
115 ----
116
117 Because the encryption is managed on the client side, you can use the same
118 datastore on the server for unencrypted backups and encrypted backups, even
119 if they are encrypted with different keys. However, deduplication between
120 backups with different keys is not possible, so it is often better to create
121 separate datastores.
122
123 NOTE: Do not use encryption if there is no benefit from it, for example, when
124 you are running the server locally in a trusted network. It is always easier to
125 recover from unencrypted backups.
126
127 Examples
128 ~~~~~~~~
129
130 // TODO: FIXME: add once available
131 //You can get a list of exported CIFS shares with:
132 //
133 //----
134 //# pvesm scan pbs <server> [--username <username>] [--password]
135 //----
136
137 Then you could add this share as a storage to the whole {pve} cluster
138 with:
139
140 ----
141 # pvesm add pbs <id> --server <server> --datastore <datastore> --username <username> --fingerprint 00:B4:... --password
142 ----
143
144 ifdef::wiki[]
145
146 See Also
147 ~~~~~~~~
148
149 * link:/wiki/Storage[Storage]
150
151 endif::wiki[]