{"id":17432187,"url":"https://github.com/marekjm/bare-bones-backup","last_synced_at":"2026-05-18T09:36:46.009Z","repository":{"id":142429483,"uuid":"106750202","full_name":"marekjm/bare-bones-backup","owner":"marekjm","description":"Bare-bones, encrypted off-site backup script","archived":false,"fork":false,"pushed_at":"2017-11-15T22:37:56.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-07T21:46:17.430Z","etag":null,"topics":["backup","backup-script","bash-script","encrypted","encrypted-backup","gpg","off-site","rsync","scp","self-hosted","ssh","tar"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marekjm.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-10-12T22:06:23.000Z","updated_at":"2020-10-02T15:14:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"2132daf1-3c40-4b9e-87e5-a287767d3d80","html_url":"https://github.com/marekjm/bare-bones-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marekjm/bare-bones-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fbare-bones-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fbare-bones-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fbare-bones-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fbare-bones-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marekjm","download_url":"https://codeload.github.com/marekjm/bare-bones-backup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fbare-bones-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","backup-script","bash-script","encrypted","encrypted-backup","gpg","off-site","rsync","scp","self-hosted","ssh","tar"],"created_at":"2024-10-17T08:24:26.108Z","updated_at":"2026-05-18T09:36:45.983Z","avatar_url":"https://github.com/marekjm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup\n\n\u003e *Embarassingly simple* backup solution.\n\nYou want to have a backup of your data, trust me.\nMaybe you don't need it now, but you still want to have it.\nJust in case.\n\nNow that you have a backup on a separate drive inside your PC, and\nanother one on a disconnected drive stored securely in the corner of\nyour desk, you start looking for a more... distributed solution.\nWhat you want is an off-site backup.\nAs it happens, you have a server with SSH access just sitting over\nthere, doing nothing, and you have some spare GBs on it.\n\nThis is exactly the scenario in which this repository becomes useful.\nIt is the most bare-bones off-site backup script you will probably find.\n\n**Pros**:\n\n- encrypted using GPG\n- written in BASH so runs on pretty much anything\n- uses SSH for transport between local machine and remote storage server\n- performs rudimentary deduplication and compression\n\n**Cons**:\n\n- written in BASH so it has the usual quirks of BASH scripts\n- uses SSH for transport so is kinda slow\n- performs only rudimentary deduplication so your archive size roughly equals the real size of your data\n\n\n#### WARNING!\n\nBe warned that it is a prototype!\nI wrote it to diversify my backups and published it in hope that it may be useful for other people, but\nI cannot in good faith say that this is a rock solid software and will not fail.\nUse at your own risk.\n\nAND ALWAYS HAVE UP-TO-DATE BACKUP IN AT LEAST TWO LOCATIONS!\n\n\n----\n\n## Configuration\n\nPut this in `~/.backup.config` file:\n\n```\n# Fingerprint of GPG key used to encrypt the backup.\ngpg_key=ABC012DEADBEEFC0FFEE\n\n# The script needs to know where to upload blocks and indexes.\nstorage_user=john.doe\nstorage_host=example.com\nstorage_root=/home/backup/johndoe\n```\n\nOn the remote machine, in the `storage_root` directory you must create two subdirectories: `blocks` and\n`indexes`.\n\n\n----\n\n## Usage\n\nTo create the backup use:\n\n```\n]$ cd ~\n]$ B3_ARCHIVE_NAME=stuff create.sh ./Important/Stuff\n```\n\nTo restore the backup use:\n\n```\n]$ cd ~\n   # First operand is the name of the backup, and\n   # the second is the timestamp of that backup you want to\n   # restore.\n]$ restore-remote.sh stuff 20171012T232347\n```\n\n\n----\n\n### Details\n\nThe basic idea is to create a big tar archive split into 128K blocks of encrypted data,\ndeduplicate and compress it, and ship it off to some server.\n\nThis program is written in such a way that it never sees a full tar file; it is always\npiping data, so the \"working size\" should not exceed a few megabytes for blocks.\nIt needs, however, to have a full archive index available during both the creation of the\nbackup (to store the order of blocks), and the restoration of the backup (to know which\nblocks should be fetched and extracted).\n\nWhile blocks should always be roughly ~128K in size, indexes can grow *big*.\nThe size of the index is about 1 byte for every 1KB of backup data (before encryption,\ncompression, and deduplication).\nBlocks of data are identified by their SHA512 sums.\nSHA512 has the convenient property that its hex digests are 128 bytes long, and\nmap nicely to the 128KB block size.\n\n\n#### Pipelines\n\nWhen creating a backup:\n\n```\n{local machine} -\u003e tar -\u003e split -\u003e SHA512 -\u003e gzip -\u003e GPG -\u003e scp -\u003e {remote machine}\n```\n\nWhen restoring a backup:\n\n```\n{remote machine} -\u003e scp -\u003e GPG -\u003e gzip -\u003e tar -\u003e {local machine}\n```\n\n\n----\n\n## License\n\nThis is Free Software published under GNU GPL v3 or any later version of this license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekjm%2Fbare-bones-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarekjm%2Fbare-bones-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekjm%2Fbare-bones-backup/lists"}