Healthcare Blocks generates a nightly snapshot of every storage volume attached to your virtual machines that is retained for one day. Snapshots can be used to replace a failed volume or to rebuild a machine in the unlikely event of infrastructure failure but are not intended to serve as a true filesystem backup solution.
If you would like to generate daily filesystem backups of a specific directory, you can define a cron job that copies your files to a custom Amazon S3 bucket, as described below:
1. Create a ticket requesting an S3 bucket to be provisioned and configured by the Healthcare Blocks team. We will ensure the proper access controls are in place, encryption is enabled by default, and logging is enabled.
2. SSH to your server, and run sudo su and then crontab -e which will launch a console editor. Then enter the following definition:
0 1 * * * aws s3 cp <target dir> s3://<bucket name>/$(date +"%Y-%m-%d")/ --recursive --storage-class STANDARD_IA
"0 1 * * *" is cron notation that corresponds to nightly at 1 AM local time. "Target dir" is the source of your files and "bucket name" is the bucket provided by Healthcare Blocks.
If you have multiple directories that do not share a common ancestor directory, you can add multiple entries to your cron file.
- Application source code should be stored in an external git repository or other location. Customers using Dokku-based environments should not rely on the server-side git repository for this need, since it is primarily used for deployment and build purposes.
- Healthcare Blocks managed database services already include nightly backups of the database schema and data as described in this article.
Need assistance with this topic? Feel free to create a ticket.