Backup and Restore

You can backup and restore entire organizations, accounts or objects with the Dataloop Command Line Tool and a Linux backup server.

1. Install the Dataloop Command Line Utility

pip install dlcli

2. Create the file /etc/dataloop/dlcli.yaml and enter your details

account: default
key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
org: acme-ltd

3. Create a directory for your backups

mkdir /backup

4. Create a private Git repo called 'dataloop', add deploy keys for the root user with push access and optionally add a webhook to notify a Slack channel. Then clone into /backup so you have /backup/dataloop as your local copy.

5. Create a file called in /usr/local/bin with the following content

#!/usr/bin/env bash
cd /backup/dataloop
rm -fr /backup/dataloop/*
/usr/local/bin/dlcli --backupdir /backup/dataloop --settingsfile /etc/dataloop/dlcli.yaml backup org acme-ltd
git add .
git commit -m 'backup of acme-ltd org'
git push

Change the acme-ltd to whatever your org is called.

6. Setup a cron to run the backup every 10 mins

*/10 * * * * /usr/local/bin/ > /var/log/backup.log 2>&1
Have more questions? Submit a request


Please sign in to leave a comment.