{"id":13586312,"url":"https://github.com/MatteoGuadrini/Butterfly-Backup","last_synced_at":"2025-04-07T15:31:32.407Z","repository":{"id":52115344,"uuid":"144019953","full_name":"MatteoGuadrini/Butterfly-Backup","owner":"MatteoGuadrini","description":"Butterfly Backup is a simple command line wrapper of rsync for complex task, written in python.","archived":false,"fork":false,"pushed_at":"2025-04-04T10:27:52.000Z","size":1602,"stargazers_count":120,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T16:07:40.179Z","etag":null,"topics":["archive","backup","backup-script","backup-server","bulk-backup","catalog","differential","export","incremental","mirror","parallelism","python3","restore","retention","retention-policy","rsync","rsync-backup","rsync-backup-script","rsync-backups","rsync-wrapper"],"latest_commit_sha":null,"homepage":"https://matteoguadrini.github.io/Butterfly-Backup/","language":"Python","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/MatteoGuadrini.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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-08-08T13:47:02.000Z","updated_at":"2025-04-04T10:27:56.000Z","dependencies_parsed_at":"2024-08-27T12:25:01.756Z","dependency_job_id":"79a2f4b2-51b3-4225-a3c4-53573bf93b82","html_url":"https://github.com/MatteoGuadrini/Butterfly-Backup","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FButterfly-Backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FButterfly-Backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FButterfly-Backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatteoGuadrini%2FButterfly-Backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatteoGuadrini","download_url":"https://codeload.github.com/MatteoGuadrini/Butterfly-Backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247679466,"owners_count":20978057,"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":["archive","backup","backup-script","backup-server","bulk-backup","catalog","differential","export","incremental","mirror","parallelism","python3","restore","retention","retention-policy","rsync","rsync-backup","rsync-backup-script","rsync-backups","rsync-wrapper"],"created_at":"2024-08-01T15:05:28.042Z","updated_at":"2025-04-07T15:31:32.399Z","avatar_url":"https://github.com/MatteoGuadrini.png","language":"Python","readme":"\u003cimg src=\"https://butterfly-backup.readthedocs.io/en/latest/_static/bb_logo.svg\" alt=\"Butterfly Backup\" align=\"right\" width=\"150\"/\u003e Butterfly Backup\n======\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7fc47024f17f4dffa3be08a7a5ab31bd)](https://app.codacy.com/app/MatteoGuadrini/Butterfly-Backup?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=MatteoGuadrini/Butterfly-Backup\u0026utm_campaign=Badge_Grade_Dashboard)\n[![CircleCI](https://circleci.com/gh/MatteoGuadrini/Butterfly-Backup.svg?style=svg)](https://circleci.com/gh/MatteoGuadrini/Butterfly-Backup)\n\n## Introduction\nButterfly Backup is a modern backup program that can back up your files:\n\n* from **Linux**, **BSD**, **Mac** and **Windows** (through [cygwin](https://www.cygwin.com/))\n* **easily**, being a single executable that you can run without a server or complex setup\n* **effectively**, only transferring the parts that actually changed in the files you back up, in four mode (_full_, _incremental_, _differential_ and _mirror_)\n* **verifiably**, store all backup in a readable catalog also through file system\n* **speedly**, parallelizing all backup, restore and export operations\n* **securely**, exporting, archiving and applying retention\n* **freely** - entirely free to use and completely open source\n\n## Test\nIf you want to try or test Butterfly Backup before installing it, run the test:\n```console\n$ git clone https://github.com/MatteoGuadrini/Butterfly-Backup.git\n$ cd Butterfly-Backup\n$ bash test_bb.py\n...\n[92512a6e-506e-11eb-b747-2ba55b805ea5]\ntype = full\npath = /tmp/bb_repo/localhost/2024_01_06__23_28\nname = localhost\nos = unix\ntimestamp = 2024-01-06 23:28:59\nstart = 2024-01-06 23:28:59\nend = 2024-01-06 23:29:04\nstatus = 0\n```\n\n## Installation\nInstall Butterfly Backup is very simple; run this:\n```bash\ngit clone https://github.com/MatteoGuadrini/Butterfly-Backup.git\ncd Butterfly-Backup\nsudo python3 setup.py install -f # -f is for upgrade\n# or\nsudo pip install . --upgrade\nbb --help\n```\n\n## Quickstart\nA short demo of Butterfly Backup:\n```bash\nbb backup --computer host1 --destination /nas/mybackup --data user config --type macos --mode full\n```\nor with short option:\n```bash\nbb backup -c host1 -d /nas/mybackup -D user config -t macos -m full\n```\nSo we created a first _full_ backup, on a _macos_ machine, considering the folders _User_ -\u003e /Users and _Config_ -\u003e /private/etc in the destination _/nas/mybackup_\n\n\u003e [!NOTE]  \n\u003e If you do not specify the user, Butterfly Backup will assume that the source and the destination know the same user; for example, I start the backup with the above command and my user is calling _arthur_, he will use the latter to log in to host1.\n\nNow that we have our first full backup, we can run _incremental_ for the next few times.\n```bash\nbb backup --computer host1 --destination /nas/mybackup --data user config --type macos\n```\nor with short option:\n```bash\nbb backup -c host1 -d /nas/mybackup -D user config -t macos\n\n```\n\u003e [!NOTE]  \n\u003e Incremental mode performs a full backup when they have not been done before.\n\nBefore starting any restore, you need to understand what kind of data and in what time period you have to start.\nSo, let's start checking our backups into the catalog, with this command:\n```bash\nbb list --catalog /nas/mybackup\n```\n\nThe result will be the following:\n\n```bash\nBUTTERFLY BACKUP CATALOG\n\nBackup id: f65e5afe-9734-11e8-b0bb-005056a664e0\nHostname or ip: host1\nTimestamp: 2024-08-03 17:50:36\n\nBackup id: 4f2b5f6e-9939-11e8-9ab6-005056a664e0\nHostname or ip: host1\nTimestamp: 2024-08-06 07:26:46\n\nBackup id: cc6e2744-9944-11e8-b82a-005056a664e0\nHostname or ip: host1\nTimestamp: 2024-08-06 08:49:00\n```\n\nSelect (copy) _Backup id_ when you want restore a backup.\nFor exit, press `q`.\n\nNow, run this command for more detail (for example, try the first):\n\n```bash\nbb list --catalog /nas/mybackup --backup-id f65e5afe-9734-11e8-b0bb-005056a664e0\n```\nThe result will be the following:\n```bash\nBackup id: f65e5afe-9734-11e8-b0bb-005056a664e0\nHostname or ip: host1\nType: full\nTimestamp: 2024-08-03 17:50:36\nStart: 2024-08-03 17:50:36\nFinish: 2024-08-03 18:02:32\nOS: macos\nExitCode: 0\nPath: /nas/mybackup/host1/2024_08_03__17_50\nList: etc\nUsers\n```\n\nNow that we are sure that the selected backup is what we want (both in data and on date), run this command:\n\n```bash\nbb restore --computer host1 --catalog /nas/mybackup --backup-id f65e5afe-9734-11e8-b0bb-005056a664e0\n```\nSo we have restored the data saved on the date indicated in our _host1_.\n\n## 3-2-1 rule\n\nWith Butterfly Backup you can apply _3-2-1 rule_ (Keep three copies of your data on two different types of media, with one copy offsite) in only 4 lines:\n\n```bash\nCATALOG=\"/nas/mybackup\"\nbb backup --computer host1 --destination $CATALOG --data user config --type macos; BCKID=\"$(bb list --catalog $CATALOG --last --computer host1 --only-id)\"\nbb export --catalog $CATALOG --backup-id \"$BCKID\" --destination /mnt/other_backup/\n# attach you USB drive on your host1...\nbb restore --computer host1 --catalog $CATALOG --backup-id \"$BCKID\" --root-dir /usb/path   # on Windows /cygdrive/d/\n```\n\nSchedule on your own this script in your backup server and you have applied the rule.\n\n## Documentation\n[Manual of Butterfly Backup](https://Butterfly-Backup.readthedocs.io/en/latest/) or run help:\n```bash\nbb --help\n```\n\n## Open source\nButterfly Backup is a open source project. Any contribute, It's welcome.\n\n**A great thanks**.\n\nFor donations, press this\n\nFor me\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/guos)\n\nFor [Telethon](http://www.telethon.it/)\n\nThe Telethon Foundation is a non-profit organization recognized by the Ministry of University and Scientific and Technological Research.\nThey were born in 1990 to respond to the appeal of patients suffering from rare diseases.\nCome today, we are organized to dare to listen to them and answers, every day of the year.\n\n[Adopt the future](https://www.ioadottoilfuturo.it/)\n\n## Acknowledgments\n\nThanks to Mark Lutz for writing the _Learning Python_ and _Programming Python_ books that make up my python foundation.\n\nThanks to Kenneth Reitz and Tanya Schlusser for writing the _The Hitchhiker’s Guide to Python_ books.\n\nThanks to Dane Hillard for writing the _Practices of the Python Pro_ books.\n\nSpecial thanks go to my wife, who understood the hours of absence for this development. \nThanks to my children, for the daily inspiration they give me and to make me realize, that life must be simple.\n\nThanks Python!","funding_links":["https://www.paypal.me/guos"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatteoGuadrini%2FButterfly-Backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMatteoGuadrini%2FButterfly-Backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatteoGuadrini%2FButterfly-Backup/lists"}