{"id":22859744,"url":"https://github.com/narkisr/octo","last_synced_at":"2026-05-03T04:33:32.750Z","repository":{"id":6751534,"uuid":"7997971","full_name":"narkisr/octo","owner":"narkisr","description":"Backup your online Repos","archived":false,"fork":false,"pushed_at":"2020-12-25T12:45:02.000Z","size":773,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T12:48:07.378Z","etag":null,"topics":["backup","clojure","gitblit","github","octo","rclone","zbackup"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/narkisr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-03T23:03:15.000Z","updated_at":"2020-12-28T23:53:03.000Z","dependencies_parsed_at":"2022-09-04T00:10:29.538Z","dependency_job_id":null,"html_url":"https://github.com/narkisr/octo","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkisr%2Focto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkisr%2Focto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkisr%2Focto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkisr%2Focto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narkisr","download_url":"https://codeload.github.com/narkisr/octo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436565,"owners_count":20777045,"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":["backup","clojure","gitblit","github","octo","rclone","zbackup"],"created_at":"2024-12-13T09:07:55.155Z","updated_at":"2026-05-03T04:33:32.707Z","avatar_url":"https://github.com/narkisr.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nBackup your Github repos (because pushing code online isn't good [enough](https://about.gitlab.com/2017/02/10/postmortem-of-database-outage-of-january-31/)).\n\n[![Build Status](https://travis-ci.org/narkisr/octo.png)](https://travis-ci.org/narkisr/octo)\n\n# Usage\n\nMake sure to have an octo.edn file and an ssh access key from the current user account:\n\n```bash\n $ octo sync octo.edn\n ...\n # Once done the git bundles are under (per user/org)\n $ ls ~/workspace/repos/narkisr/bundles\n aptly-docker.bundle\n basebox-packer.bundle\n\n # push to a remote backup like s3 using zbackup and rclone\n $ octo push octo.edn\n\n # restore backup from remote backup\n $ octo pull octo.edn\n```\n\n## Configuration\n\nThe format of octo.edn is:\n\n```clojure\n{\n :workspace \"/home/ronen/workspace\"\n :user \"GITHUB USER\"\n :token \"PERSONAL ACCESS TOKEN\"\n :repos [\n    {:user \"narkisr\"\n     :options {:fpm-barbecue {:branch \"master\"}} ; only backup a single branch\n     :exclude []\n     :layouts [[\"elm-*\" \"narkisr/elm\"] [\".*\" \"narkisr\"]]\n    }\n    {:org \"opskeleton\"\n     :exclude []\n     :layouts [[\".*\" \"opskeleton\"]]\n    }\n  ]\n\n :push {\n   :zbackup {\n     :password-file \"\"\n    }\n\n   :rclone {\n    :dest \"\"\n   }\n }\n\n}\n```\n\nGlossary:\n\n* workspace: backup destination folder.\n* user: github user.\n* token: a personal access token.\n* repos a collection of users/orgs we want to backup:\n  * user/org: the user/org name that is backed up.\n  * options: specific repo options (currently only selecting a single branch to back up).\n  * exclude: which repos not to back up.\n  * layouts: mapping from folder name regex match into destination folder,\n    for example match all the repos with name elm-* prefix into narkisr/elm folder.\n* push:\n  * zbackup.password-file: password for zbackup (if using push/pull)\n  * rclone.dest: A remote backup address\n\n## Backup lifecycle\n\nEach repo:\n\n1. Cloned into a bare repo using 'git clone --mirror'.\n2. Exported to a single file using 'git bundle create'.\n3. Incremented using 'git fetch remote'.\n\n# Install\n\nPerquisites:\n\n* JRE 1.8\n* Git binary.\n* [rclone](rclone.org) and [zbackup](zbackup.org) (if using push/pull).\n* Ubuntu (Should work on any Linux system but not tested).\n\n```bash\n$ wget https://github.com/narkisr/octo/releases/download/0.8.2/octo\n$ sudo mv octo /usr/local/bin\n```\n\n# Copyright and license\n\nCopyright [2020] [Ronen Narkis]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n  [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkisr%2Focto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarkisr%2Focto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkisr%2Focto/lists"}