storage Configuration File
Location: /batm/config/storage
The storage configuration file is optional and may not exist on your server. This article is intended to describe the contents of this file if it exists or you choose to store your image data off-server.
Configuration instructions for using Amazon S3 storage are provided below.
When the default internal storage is changed, it only affects the following items:
identity documents,
camera captures, and
fingerprints.
The remaining data items/folders will continue to be stored locally.
provider=local
access_key={your access key}
secret_key={your secret key}
region={aws region of the bucket}
bucket={your bucket}
endpoint_url={optional for supporting alternatives such as MinIO S3 etc}provider: can currently be either [s3] or [local].
access_key: the API or access key to remotely access the selected provider’s storage.
secret_key: the secret key to remotely access the selected provider’s storage.
region: the data storage center that contains your bucket or remote drive.
bucket: the S3 bucket name you created.
endpoint_url: (optional) where required, delete the entire line if unused.
Amazon S3 Instructions
With CAS version 20260601+ Operators can now migrate files from local storage to AWS S3. Depending on the amount of your data and your internet speed, it may take some time (hours -> days), so block out sufficient time before beginning.
A) Setup your bucket at AWS
Create an account and bucket at Amazon: https://aws.amazon.com/s3/
Note the bucket region that you selected during creation:
Note the name you created for the bucket:
Create the required API access keys at AWS.
Navigate to: Identity and Access Management (IAM) > My security Credentials
Click “Create access key” to view the Access key and Secret Key required next.
B) Configure your CAS host from the console
Install AWS-CLI
Install AWS CLI on the server, e.g.:
snap install aws-cli --classicConfigure CAS
Create the storage file at config:
sudo nano /batm/config/storageEnter these S3 credentials for the initial transfer:
provider=local
access_key={your access key}
secret_key={your secret key}
region={aws region of the bucket}
bucket={your bucket}Initiate the migration from the CAS host console
Bulk upload (server online — server keeps running, takes hours or days on large datasets)
sudo /batm/batm-migrate-to-s3 syncUploads all files from the four identity locations to S3. Safe to interrupt and resume. Run repeatedly – each pass only uploads what's new since the last run. It uses aws s3 sync internally, it’s possible to tweak the upload parameters - https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
Check the status of the migration (as/if needed) using:
sudo /batm/batm-manage migrate-to-s3 statusRepeat until delta is small (server online)
Re-run sync until two consecutive passes complete in under a minute or relatively fast. This drains the backlog written by the live server during step 1.
Final sync + switchover
Your CAS server will be down for a brief period.
Shutdown CAS:
sudo /batm/batm-manage stop allPerform the final migration:
sudo /batm/batm-migrate-to-s3 sync # final delta — no concurrent writes
sudo /batm/batm-migrate-to-s3 verify # optional: confirm all files are in S3Change the provider setting in the storage file:
sudo nano /batm/config/storageChange
provider=localto:provider=s3
Finally, start CAS:
sudo /batm/batm-manage start allVerify by opening a recent customer identity record in the admin UI — documents and photos must render.
Local files are untouched throughout the migration — you can remove
/batm/data/[documents|capture|fingerprints_*]later when you’re confident that the files have fully and successfully migrated to the S3 bucket.
Rollback
If you decide to remove the AWS bucket as the storage destination, make the following changes.
Stop all CAS services,
change
providerback tolocal,start services.
NOTE: after the initial switch, new files are written to the S3 bucket directly with no local backup, so a rollback after that point would require you to copy the data from your bucket back to the CAS host.
Sync the new files currently on S3 back to local using the AWS CLI sync function.
There is currently no scripted support for this case.
The Identity files submitted by the newest customers will be unavailable until that sync finishes.