{"id":17799452,"url":"https://github.com/polettix/dokku-bar","last_synced_at":"2025-10-25T09:02:27.480Z","repository":{"id":136155860,"uuid":"139176783","full_name":"polettix/dokku-bar","owner":"polettix","description":"simple backup-and-restore script for dokku repos","archived":false,"fork":false,"pushed_at":"2018-06-30T14:10:11.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T18:53:26.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polettix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-29T17:19:57.000Z","updated_at":"2018-10-05T16:19:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b06985c-ab02-44e7-a40d-17dd9b6391c2","html_url":"https://github.com/polettix/dokku-bar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polettix%2Fdokku-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polettix%2Fdokku-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polettix%2Fdokku-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polettix%2Fdokku-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polettix","download_url":"https://codeload.github.com/polettix/dokku-bar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752652,"owners_count":20827987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:07:20.691Z","updated_at":"2025-10-25T09:02:27.405Z","avatar_url":"https://github.com/polettix.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup/Restore tool for Dokku\n\nThis works for my setup, your mileage may vary.\n\n## Setup\n\nI have this:\n\n- this repository checked out in `/path/to/dokku-bar`\n- a directory `/path/to/doma.in` where I keep the repos for all the stuff\n  that is deployed on `doma.in`\n- an environment file `/path/to/doma.in/dokku-bar.env` like this:\n\n        #!/bin/bash\n        : ${DISABLE_CHECKS:=yes}\n        : ${DOKKU_HOST:=doma.in}\n        : ${DOKKU_RESTORE_HOST:=\"$DOKKU_HOST\"}\n        : ${DOMAIN:=doma.in}\n        : ${RESTORE_DUMPDIR:=/path/to/doma.in/LAST}\n        : ${KEEP_RUNNING:=no}\n        : ${REMOTE:=dokku}\n        export DISABLE_CHECKS DOKKU_HOST DOKKU_RESTORE_HOST DOMAIN KEEP_RUNNING REMOTE\n\n    (Well, actually the `DOKKU_HOST` is set to a name that has a\n    configuration inside `~/.ssh/config`)\n\n- a running instance on [DigitalOcean][] has a floating IP that is\n  configured as a wildcard in the DNS configuration for `doma.in`.\n\n## Backup\n\nFor a backup I do this:\n\n    $ cd /path/to/doma.in\n    $ /path/to/dokku-bar/dokku-bar.sh backup\n    #\n    # ... some log lines on STDERR, and eventually something like this on\n    # STDOUT:\n    #\n    export DUMPDIR='/path/to/doma.in/DOKKU-20180630-105238'\n    $ rm -f LAST\n    $ ln -s DOKKU-20180630-105238 LAST\n\n## Restore\n\nFor a restore, the current procedure has a downtime that is fine for me:\n\n- spin up a new droplet in [DigitalOcean][] installing [Dokku][] according\n  to the unattended procedure ([see here for a suitable *cloud-init*\n  file][dokku-unattended], just change `example.com` to\n  your domain)\n- wait for [Dokku][] to be up and running on the new droplet (check\n  `/var/log/cloud-init-output.log` to track advance)\n- re-assign the floating IP to this new droplet (this is where the\n  downtime starts!)\n- start the restore procedure:\n\n        $ cd /path/to/doma.in\n        $ /path/to/dokku-bar/dokku-bar.sh restore\n\nAt the end of the restore all services should be up and running again.\n\n\n[DigitalOcean]: https://www.digitalocean.com/\n[Dokku]: http://dokku.viewdocs.io/dokku/\n[dokku-unattended]: https://github.com/polettix/dokku-boot/blob/master/cloud-init-unattended.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolettix%2Fdokku-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolettix%2Fdokku-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolettix%2Fdokku-bar/lists"}