Backup your data with minio and dokku
If you are handling any customer data or even accounting data on your applications or on your servers, it is mandatory to implement a backup strategy. For me the best way was to use dokku for deployment and minio as backup solution. Why? Because dokku is very easy to setup and manage your deployments and minio works like a charm, combined with dokku. In general, minio is a “object storage server” that is compatible with Amazon S3 API’s. And that is the reason why it will work in most of the popular frameworks. You could also use it as your own hosted media server.
Installing dokku
To install dokku on your server you just need 2 commands:
Dokku will also install Docker, if it is not already available on your server. Dokku deplyoments are based on git. It works very similar to Heroku. So, you have to add your SSH keys from your local machine to your Dokku server with the following command:
Setup minio
We are ready to setup our minio service. We will do this with the help of minio-dokku. You can just follow the instructions in the repository.
This will setup the minio service on your dokku server. In the next step you have to push the application to your dokku server and deploy it. At first clone the repository: git clone git@github.com:slypix/minio-dokku.git
When the files are finished cloning, change to the directory of the cloned repository and push it to your server: git push dokku master
Your minio instance is now available at minio.MY_DOMAIN.com and you are almost finished. But you should setup SSL Certificates for your minio service with the following commands:
Solving the most common error
While using minio with dokku you will probably run into this error:
An error occurred (413) when calling the UploadPart operation: Request Entity Too Large
This happens because the nginx conf of dokku has a too small config for client_max_body_size. But it’s possible to change this with the following commands:
You can replace 50m with every size that you need.