Skip to main content

Environment variables

Arius supports environment variables for sensitive credentials. When an environment variable is set, it takes precedence over the corresponding CLI flag.
VariableDescriptionCorresponding flag
ARIUS_ACCOUNT_NAMEAzure Storage Account name--accountname / -n
ARIUS_ACCOUNT_KEYAzure Storage Account key--accountkey / -k
Set ARIUS_ACCOUNT_KEY via an environment variable rather than passing it as a CLI argument. This prevents the key from appearing in your shell history and process listings.

CLI flags — archive

Archives a local directory to Azure Blob Storage.
arius archive <path>
  --accountname <accountname>  (or -n)
  --accountkey  <accountkey>   (or -k)
  --passphrase  <passphrase>   (or -p)
  --container   <containername> (or -c)
 [--remove-local]
 [--tier=<hot|cool|archive>]
FlagShortRequiredDefaultDescription
<path>YesRoot directory on the local filesystem to archive.
--accountname-nYesAzure Storage Account name. Also readable from ARIUS_ACCOUNT_NAME env var.
--accountkey-kYesAzure Storage Account key. Also readable from ARIUS_ACCOUNT_KEY env var.
--passphrase-pYesPassphrase used to encrypt blobs (AES256).
--container-cYesAzure Blob Storage container name.
--remove-localNofalseRemove local files after a successful upload.
--tierNoarchiveStorage tier for uploaded blobs: hot, cool, or archive.

CLI flags — restore

Restores files from Azure Blob Storage to the local filesystem.
arius restore [targets...]
  --accountname <accountname>  (or -n)
  --accountkey  <accountkey>   (or -k)
  --passphrase  <passphrase>   (or -p)
  --container   <containername> (or -c)
 [--root <directory>]          (or -r)
 [--download]
 [--include-pointers]
FlagShortRequiredDefaultDescription
[targets...]No./Directory or files to restore. If a directory is given, all pointer files in it and its subdirectories are restored.
--accountname-nYesAzure Storage Account name. Also readable from ARIUS_ACCOUNT_NAME env var.
--accountkey-kYesAzure Storage Account key. Also readable from ARIUS_ACCOUNT_KEY env var.
--passphrase-pYesPassphrase used to decrypt blobs.
--container-cYesAzure Blob Storage container name.
--root-rNoCurrent directoryRoot directory for the restore operation (non-Docker only).
--downloadNofalseDownload the actual file contents. If the blob is in the archive tier, rehydration is triggered; run restore again after ~15 hours.
--include-pointersNofalseCreate pointer files (.pointer.arius) alongside the downloaded binaries.

Environment variable precedence

When both an environment variable and a CLI flag are provided for the same option, the CLI flag takes precedence. Environment variables act as fallbacks when no flag is explicitly passed. This behaviour is implemented through the EnvironmentVariable attribute on each CommandOption in the CliFx framework.
CLI flag              →  used if explicitly passed on the command line
Environment variable  →  used as fallback when no CLI flag is present

Docker configuration example

When running Arius in Docker, use a .env file to pass credentials without exposing them in your shell history or docker run command.
# .env
ARIUS_ACCOUNT_NAME=mystorageaccount
ARIUS_ACCOUNT_KEY=base64encodedkeyhere==
docker run \
  --env-file .env \
  -v /absolute/path/to/archive:/archive \
  -v /absolute/path/to/logs:/logs \
  woutervanranst/arius \
  archive \
    --passphrase mysecretpassphrase \
    --container arius
Mount a /logs volume to retain structured log output outside the container for debugging and audit purposes.

Build docs developers (and LLMs) love