{"id":13500024,"url":"https://github.com/sysnux/btrfs-snapshots-diff","last_synced_at":"2025-03-29T05:32:49.974Z","repository":{"id":8878329,"uuid":"55251377","full_name":"sysnux/btrfs-snapshots-diff","owner":"sysnux","description":"Decode Btrfs send stream","archived":false,"fork":false,"pushed_at":"2022-11-15T18:55:56.000Z","size":91,"stargazers_count":48,"open_issues_count":7,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-31T18:38:35.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysnux.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2016-04-01T17:49:53.000Z","updated_at":"2024-09-09T07:29:12.000Z","dependencies_parsed_at":"2023-01-11T17:29:45.711Z","dependency_job_id":null,"html_url":"https://github.com/sysnux/btrfs-snapshots-diff","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/sysnux%2Fbtrfs-snapshots-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysnux%2Fbtrfs-snapshots-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysnux%2Fbtrfs-snapshots-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysnux%2Fbtrfs-snapshots-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysnux","download_url":"https://codeload.github.com/sysnux/btrfs-snapshots-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145012,"owners_count":20730494,"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-07-31T22:00:49.901Z","updated_at":"2025-03-29T05:32:46.948Z","avatar_url":"https://github.com/sysnux.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"btrfs-snapshots-diff\n====================\n\nAbout\n-----\n`btrfs-snapshots-diff.py` is a simple Python3 script that displays the differences \nbetween two Btrfs snapshots (from the same subvolume obviously).\n\nUses `btrfs send --no-data` to compute the differences, decodes the stream and \ndisplays the differences.\n\nUsage\n-----\n       usage: btrfs-snapshots-diff.py [options] -p PARENT -c CHILD\n              btrfs-snapshots-diff.py [options] -f FILE\n    \n       Display differences between 2 Btrfs snapshots\n    \n       optional arguments:\n         -h, --help            Show this help message and exit\n         -p, --parent PATH     Path to PARENT (older) snapshot (must be readonly)\n         -c, --child PATH      Path to CHILD (newer) snapshot \n         -f, --file FILE       Path to diff file generated by \n                               \"btrfs send --no-data -p first second \u003e FILE\"\n         -t, --filter          Do not display temporary files or any time modifications (just latest)\n         -a, --by_path         Group commands by path\n         -s, --csv             CSV output\n         -j, --json            JSON output (commands only)\n         -b, --bogus           Add bogus renamed_from action (used only when grouping by path)\n\n\n* `--json` (`-j`), available for commands only, will output a list of \ncommands in JSON format.\n\n* `--csv` (`-s`) will produce on line for each modification, instead of \nformatted output: the first column is the path, then each action taken on the \nfile is in a new column. Separator is \";\".\n\n* `--by_path` (`-a`) groups command by path, giving a better view of what \nhappenned on the file system.\n\n* `--bogus` (`-b`)  adds a bogus command to the stream, to better track renaming of \nfiles / dir (only usefull with `--by_path`).\n\n* With option `--filter` (`-t`), the script tries to be a bit smarter (only usefull \nwith `--by_path`):\n    * it does not display temporary files created by send stream,\n    * it displays 'created' or 'rewritten' on the files renamed from temporary files,\n    * it displays only the latest time modifications, if there are two or more.\n\nExample\n-------\nSee [./example.output](./example.output) file as the example of actions made by [./create-example.sh](./create-example.sh): \n\n```bash\ntouch file\nmkdir dir\nmkfifo fifo\nln file hardlink\nln -s file symlink\necho 'Hello Btrfs' \u003e 'xxx;yyy;zzz'\nmv file file2\n```\n\nTests\n-----\n\nVerify all tests by running: \n\n```bash\n./test.sh\n```\n\nRequirements\n------------\nNo requirements besides Python-3 (\u003e=3.6) and `btrfs` command obviously.\n\nBugs\n----\nThere are probably bugs, though it works for me on my own snapshots.\n\n\nLicense\n-------\nGPL v2, see LICENSE file.\n\nMade in beautiful Tahiti (French Polynesia) by [SysNux](http://www.sysnux.pf/ \"Systèmes Linux en Polynésie française\").\n\nCopyright (c) 2016 Jean-Denis Girard \u003cjd.girard@sysnux.pf\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysnux%2Fbtrfs-snapshots-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysnux%2Fbtrfs-snapshots-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysnux%2Fbtrfs-snapshots-diff/lists"}