Skip to main content

Storage destinations

A storage destination is your own bucket or container that MonoPbx writes archives, exports and backups to. Two lists with the same form:

  • Admin > Settings > Storage > Storage destinations: the company's own destinations (needs integrations:write);
  • Admin > Backups > Install storage destinations: the install's destinations (system administrators). Backups and backup copies use these.

Credentials are stored encrypted and never shown again; leave a credential field empty when you edit to keep the stored one. Test writes, reads, lists and deletes one small object and names the permission a failed step lacks.

Large files are sent in parts. If the PBX restarts in the middle of one (an update, a power cut), the next attempt goes on with the parts that were not sent yet instead of starting the file again (Amazon S3, S3-compatible services, Google Cloud Storage and Azure Blob). Every file is still checked after it arrives.

The smallest permissions, per provider​

Give MonoPbx a key that can do exactly this, on one bucket and one prefix. Replace BUCKET and PREFIX.

Amazon S3​

An IAM user (access key) or, for MonoPbx on EC2/EKS, an instance or pod role (tick Keyless):

{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetBucketObjectLockConfiguration"],
"Resource": "arn:aws:s3:::BUCKET", "Condition": { "StringLike": { "s3:prefix": ["PREFIX/*"] } } },
{ "Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:AbortMultipartUpload",
"s3:GetObjectRetention", "s3:GetObjectLegalHold"],
"Resource": "arn:aws:s3:::BUCKET/PREFIX/*" }
]
}
  • For a write-once archive, remove s3:DeleteObject: Test then reports the delete step as failed and everything else works. MonoPbx keeps backups on such a bucket forever unless retention is allowed to delete.
  • To set legal holds or retention from the console, add s3:PutObjectLegalHold and s3:PutObjectRetention.
  • With SSE-KMS, also allow kms:GenerateDataKey and kms:Decrypt on the key.
  • Region: set it on the destination (data residency checks it).

Export jobs write under the path template you set on the job and add the metadata and tags you choose (both described in Export jobs); the access above needs nothing outside that prefix.

S3-compatible services (Cloudflare R2, Backblaze B2, Wasabi, MinIO, DigitalOcean Spaces)​

Enter the service's endpoint and a key limited to one bucket:

ServiceEndpointKeyObject Lock (WORM)
Cloudflare R2https://<account id>.r2.cloudflarestorage.coman R2 API token with Object Read & Write on the bucketbucket lock rules in the R2 dashboard (no per-object hold)
Backblaze B2https://s3.<region>.backblazeb2.coman application key restricted to the bucket, with listFiles, readFiles, writeFiles, deleteFilesenable Object Lock when creating the bucket
Wasabihttps://s3.<region>.wasabisys.coma sub-user with a policy like the Amazon S3 one aboveenable Object Locking when creating the bucket
MinIOyour server's URLa user with a policy like the Amazon S3 one abovemc mb --with-lock
DigitalOcean Spaceshttps://<region>.digitaloceanspaces.coma Spaces key limited to the bucketnot offered

Export jobs write under the path template you set on the job and add the metadata and tags you choose (both described in Export jobs); the access above needs nothing outside that prefix.

Google Cloud Storage​

A service account (paste its JSON key) or, on Google Cloud, the workload identity of the host (tick Keyless). Grant it on the bucket either the predefined role Storage Object User (roles/storage.objectUser) or a custom role with exactly:

storage.objects.create
storage.objects.get
storage.objects.list
storage.objects.delete

For a write-once archive leave out storage.objects.delete and set a bucket retention policy (lock it for compliance). MonoPbx respects the retention you record on the destination, reads the bucket's retention policy when you press Test, and can put a hold on one object (see Write-once (WORM) destinations). For that add storage.objects.update (holds), storage.objects.setRetention (per-object retention, only when the bucket has object retention turned on) and storage.buckets.get (the Test check).

Export jobs write under the path template you set on the job and add the metadata and tags you choose (both described in Export jobs); the access above needs nothing outside that prefix.

Azure Blob Storage​

The storage account name and container, and one of: the account key, a SAS token limited to the container (permissions Read, Add, Create, Write, Delete, List), a service principal, or the managed identity of the host (Keyless). For a service principal or managed identity assign Storage Blob Data Contributor on the container only.

For a write-once archive set a time-based immutability policy on the container (version-level immutability) and record its days on the destination. To put a legal hold or an immutability policy on one blob from MonoPbx, the container needs version-level immutability support (turn it on when you create the container) and the key or role needs the right to set blob legal holds and immutability policies (the account key and Storage Blob Data Owner have it; Storage Blob Data Contributor does not).

Export jobs write under the path template you set on the job and add the metadata and tags you choose (both described in Export jobs); the access above needs nothing outside that prefix.

SFTP server​

Any SSH server with SFTP (an office NAS, a hosting provider's backup space). Enter:

  • Endpoint: sftp://sftp.example.com or sftp://sftp.example.com:2222. A company's server must have a public address.
  • Directory on the server: for example /upload/pbx (absolute, or relative to the login directory). It must exist and the user must be able to create sub-directories, write, read, list and delete files in it.
  • User name, and a password or a private key (OpenSSH format, ed25519 or ECDSA, without a passphrase).
  • Server host key: the server's SHA256 fingerprint, as ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub prints it on the server (SHA256:...), or its public key line (ssh-ed25519 AAAA...). It is required: MonoPbx connects only to the server with this key, so a man in the middle is refused. Ask your provider for it if you cannot run the command yourself.

Files are written next to their final name and renamed into place, so a half-written file never appears. SFTP servers have no storage classes or object lock: use client-side encryption if the server is not yours, and the server's own snapshots for write-once copies.

Export jobs write under the path template you set on the job and add the metadata and tags you choose (both described in Export jobs); the access above needs nothing outside that prefix.

Write-once (WORM) destinations​

Under Object lock on the destination enter the mode (governance or compliance) and the days of the bucket's default retention. MonoPbx then:

  • never tries to delete what is younger than that (backup retention keeps those backups and shows them as locked);
  • on Amazon S3 and S3-compatible services with Object Lock, on Google Cloud Storage and on Azure Blob, reads each object's retention and hold before any delete and refuses if either holds;
  • lets you put a legal hold on one object, or give it a retention date, from Storage compliance:
ProviderWhat a legal hold isPer-object retentionWhat the bucket or container needs
Amazon S3 and S3-compatiblethe object's legal holdgovernance or compliance until a datethe bucket created with Object Lock
Google Cloud Storagethe object's temporary holdUnlocked (governance) or Locked (compliance) until a dateper-object retention turned on for the bucket (holds need nothing)
Azure Blobthe blob's legal holdan unlocked (governance) or locked (compliance) immutability policy until a dateversion-level immutability support on the container

On Google Cloud Storage a hold or a bucket retention policy set elsewhere protects the object too: MonoPbx reads it and does not delete. Press Test to see the bucket's retention policy checked against the one you recorded (Google Cloud Storage and Amazon S3; Azure's container policy is not read by MonoPbx).

Object Lock can only be turned on when a bucket is created. Compliance mode cannot be shortened by anyone, the account owner included: try governance mode first.

Examples​

  • Off-site backup copy: an install destination on another provider or region, then Admin > Backups > Storage status > Add a copy, every 24 hours, keeping 30 daily, 12 weekly and 24 monthly backups.
  • Ten-year recording archive: an S3 bucket created with Object Lock, default retention compliance, 3650 days, a key without s3:DeleteObject, and the same lock recorded on the destination.
  • Office NAS over SFTP: an install destination sftp://nas.example.com, directory /volume1/pbx-backups, a user that can only write there, its ed25519 key, and the NAS's host key fingerprint.
  • Company in the EU only: set the company's data residency to eu-* (Storage compliance) and give its destinations their EU region.

See also Storage compliance and Backup and restore.