]> git.proxmox.com Git - proxmox-backup.git/blame - docs/managing-remotes.rst
docs: mention group filter in sync docs
[proxmox-backup.git] / docs / managing-remotes.rst
CommitLineData
04e24b14
DW
1Managing Remotes
2================
3
476328b3
OB
4.. _backup_remote:
5
04e24b14
DW
6:term:`Remote`
7--------------
8
9A remote refers to a separate Proxmox Backup Server installation and a user on that
10installation, from which you can `sync` datastores to a local datastore with a
11`Sync Job`. You can configure remotes in the web interface, under **Configuration
12-> Remotes**. Alternatively, you can use the ``remote`` subcommand. The
13configuration information for remotes is stored in the file
14``/etc/proxmox-backup/remote.cfg``.
15
16.. image:: images/screenshots/pbs-gui-remote-add.png
17 :align: right
18 :alt: Add a remote
19
7ccbce03
DW
20To add a remote, you need its hostname or IP address, a userid and password on
21the remote, and its certificate fingerprint. To get the fingerprint, use the
04e24b14
DW
22``proxmox-backup-manager cert info`` command on the remote, or navigate to
23**Dashboard** in the remote's web interface and select **Show Fingerprint**.
24
25.. code-block:: console
26
27 # proxmox-backup-manager cert info |grep Fingerprint
28 Fingerprint (sha256): 64:d3:ff:3a:50:38:53:5a:9b:f7:50:...:ab:fe
29
30Using the information specified above, you can add a remote from the **Remotes**
31configuration panel, or by using the command:
32
33.. code-block:: console
34
35 # proxmox-backup-manager remote create pbs2 --host pbs2.mydomain.example --userid sync@pam --password 'SECRET' --fingerprint 64:d3:ff:3a:50:38:53:5a:9b:f7:50:...:ab:fe
36
37Use the ``list``, ``show``, ``update``, ``remove`` subcommands of
38``proxmox-backup-manager remote`` to manage your remotes:
39
40.. code-block:: console
41
42 # proxmox-backup-manager remote update pbs2 --host pbs2.example
43 # proxmox-backup-manager remote list
44 ┌──────┬──────────────┬──────────┬───────────────────────────────────────────┬─────────┐
45 │ name │ host │ userid │ fingerprint │ comment │
46 ╞══════╪══════════════╪══════════╪═══════════════════════════════════════════╪═════════╡
47 │ pbs2 │ pbs2.example │ sync@pam │64:d3:ff:3a:50:38:53:5a:9b:f7:50:...:ab:fe │ │
48 └──────┴──────────────┴──────────┴───────────────────────────────────────────┴─────────┘
49 # proxmox-backup-manager remote remove pbs2
50
51
52.. _syncjobs:
53
54Sync Jobs
55---------
56
57.. image:: images/screenshots/pbs-gui-syncjob-add.png
58 :align: right
59 :alt: Add a Sync Job
60
61Sync jobs are configured to pull the contents of a datastore on a **Remote** to
6227b9ba 62a local datastore. You can manage sync jobs in the web interface, from the
7ccbce03
DW
63**Sync Jobs** tab of the **Datastore** panel or from that of the Datastore
64itself. Alternatively, you can manage them with the ``proxmox-backup-manager
65sync-job`` command. The configuration information for sync jobs is stored at
66``/etc/proxmox-backup/sync.cfg``. To create a new sync job, click the add button
67in the GUI, or use the ``create`` subcommand. After creating a sync job, you can
68either start it manually from the GUI or provide it with a schedule (see
69:ref:`calendar-event-scheduling`) to run regularly.
04e24b14
DW
70
71.. code-block:: console
72
73 # proxmox-backup-manager sync-job create pbs2-local --remote pbs2 --remote-store local --store local --schedule 'Wed 02:30'
74 # proxmox-backup-manager sync-job update pbs2-local --comment 'offsite'
75 # proxmox-backup-manager sync-job list
76 ┌────────────┬───────┬────────┬──────────────┬───────────┬─────────┐
77 │ id │ store │ remote │ remote-store │ schedule │ comment │
78 ╞════════════╪═══════╪════════╪══════════════╪═══════════╪═════════╡
79 │ pbs2-local │ local │ pbs2 │ local │ Wed 02:30 │ offsite │
80 └────────────┴───────┴────────┴──────────────┴───────────┴─────────┘
81 # proxmox-backup-manager sync-job remove pbs2-local
82
7ccbce03 83To set up sync jobs, the configuring user needs the following permissions:
04e24b14 84
9de7c71a 85#. ``Remote.Read`` on the ``/remote/{remote}/{remote-store}`` path
7ccbce03 86#. At least ``Datastore.Backup`` on the local target datastore (``/datastore/{store}``)
9de7c71a
FG
87
88If the ``remove-vanished`` option is set, ``Datastore.Prune`` is required on
89the local datastore as well. If the ``owner`` option is not set (defaulting to
7ccbce03 90``root@pam``) or is set to something other than the configuring user,
9de7c71a
FG
91``Datastore.Modify`` is required as well.
92
01ae7bfa
FG
93If the ``groups`` option is set, only backup groups matching at least one of
94the specified criteria (backup type, full group identifier, or a regular
95expression matched against the full group identifier) are synced. The same
96filter is applied to local groups for handling of the ``remove-vanished``
97option.
98
9de7c71a
FG
99.. note:: A sync job can only sync backup groups that the configured remote's
100 user/API token can read. If a remote is configured with a user/API token that
101 only has ``Datastore.Backup`` privileges, only the limited set of accessible
102 snapshots owned by that user/API token can be synced.