diff --git a/docs/administration-guide.rst b/docs/administration-guide.rst index 1b1155a5..c270bdb1 100644 --- a/docs/administration-guide.rst +++ b/docs/administration-guide.rst @@ -737,6 +737,9 @@ on the backup server. The default value for ``username`` ist ``root@pam``. If no server is specified, the default is the local host (``localhost``). +Note that if the server is an IPv6 address, you have to write it with +square brackets (e.g. [fe80::01]). + You can pass the repository with the ``--repository`` command line option, or by setting the ``PBS_REPOSITORY`` environment variable. diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs index aba307e2..6ad67607 100644 --- a/src/api2/types/mod.rs +++ b/src/api2/types/mod.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use proxmox::api::{api, schema::*}; use proxmox::const_regex; -use proxmox::{IPRE, IPV4RE, IPV6RE, IPV4OCTET, IPV6H16, IPV6LS32}; +use proxmox::{IPRE, IPRE_BRACKET, IPV4RE, IPV6RE, IPV4OCTET, IPV6H16, IPV6LS32}; use crate::backup::CryptMode; use crate::server::UPID; @@ -65,7 +65,7 @@ const_regex!{ pub DNS_NAME_OR_IP_REGEX = concat!(r"^", DNS_NAME!(), "|", IPRE!(), r"$"); - pub BACKUP_REPO_URL_REGEX = concat!(r"^^(?:(?:(", USER_ID_REGEX_STR!(), ")@)?(", DNS_NAME!(), "|", IPRE!() ,"):)?(", PROXMOX_SAFE_ID_REGEX_STR!(), r")$"); + pub BACKUP_REPO_URL_REGEX = concat!(r"^^(?:(?:(", USER_ID_REGEX_STR!(), ")@)?(", DNS_NAME!(), "|", IPRE_BRACKET!() ,"):)?(", PROXMOX_SAFE_ID_REGEX_STR!(), r")$"); pub CERT_FINGERPRINT_SHA256_REGEX = r"^(?:[0-9a-fA-F][0-9a-fA-F])(?::[0-9a-fA-F][0-9a-fA-F]){31}$";