{"id":39840550,"url":"https://github.com/knighthat/zstd-backup","last_synced_at":"2026-01-18T13:27:16.887Z","repository":{"id":221614617,"uuid":"648307423","full_name":"knighthat/zstd-backup","owner":"knighthat","description":"Cross-platform python script that compresses your files/folder using Zstandard algorithm","archived":false,"fork":false,"pushed_at":"2024-07-08T20:24:26.000Z","size":205,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2024-07-09T01:21:19.046Z","etag":null,"topics":["backup-script","linux","macos","windows","zstandard"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knighthat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-06-01T17:05:03.000Z","updated_at":"2024-07-08T20:13:03.000Z","dependencies_parsed_at":"2024-02-29T07:24:26.053Z","dependency_job_id":"1f8cfb21-4583-4469-852d-98185e028d0e","html_url":"https://github.com/knighthat/zstd-backup","commit_stats":null,"previous_names":["knighthat/linux-server-backup"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/knighthat/zstd-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knighthat%2Fzstd-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knighthat%2Fzstd-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knighthat%2Fzstd-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knighthat%2Fzstd-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knighthat","download_url":"https://codeload.github.com/knighthat/zstd-backup/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knighthat%2Fzstd-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"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-script","linux","macos","windows","zstandard"],"created_at":"2026-01-18T13:27:16.170Z","updated_at":"2026-01-18T13:27:16.878Z","avatar_url":"https://github.com/knighthat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eZSTD BACKUP\u003c/h1\u003e\n\u003cp align=\"center\"\u003eBackup your files and folders using ZSTD compression algorithm\u003c/p\u003e\n\n# Why Zstandard (ZSTD)\n\nZstandard (ZSTD) provides the best compression ratio (as far as I know). \\\nFurthermore, the algorithm also allows multithreading for faster compression while being easy to use\nand is compatible with tar command\n\nFor more details, visit [facebook/zstd](https://github.com/facebook/zstd)\n\n---\n\n# Table of contents\n\n* [Requirements](#requirements)\n    1. Python\n    2. Git\n* [Setup](#setup)\n    1. Clone repo\n    2. Create virtual environment\n    3. Install dependencies\n    4. Edit configuration\n    5. Execute program\n* [config.yml](#configyml)\n* [Issues](#issues)\n* [License](#license)\n\n---\n\n# Installation\n\n## Requirements\n\n1. Python (3.8 - 3.13)\n    - Linux: Included in most modern distros\n    - [Windows](https://www.python.org/downloads/windows/)\n    - [MacOS](https://www.python.org/downloads/macos/)\n2. Git\n    * Debian-based distros (Debian, Ubuntu, Mint, etc.): `apt install git`\n    * RedHat-based distros (Red Hat, Fedora, CentOS, etc.): `dnf install git`\n    * Arch-based distros (Arch Linux, Manjaro): `pacman -S git`\n    * [Git for Windows](https://git-scm.com/download/win)\n    * [Git for macOS](https://git-scm.com/download/mac)\n\n## Setup\n\n1. Clone this repository\n\n   ```shell\n   git clone --depth 1 https://github.com/knighthat/zstd-backup \u0026\u0026 cd zstd-backup\n   ```\n\n2. Create virtual environment (recommended, or use global python)\n\n    * **Windows**\n\n      \u003e Run this in your command prompt or powershell\n\n      ```shell\n      python -m venv venv\n      ```\n\n    * **Linux**\n\n      \u003e Some distros require you to install `venv` module before executing this command\n\n       ```shell\n       /usr/bin/python3 -m venv venv\n       ```\n\n    * MacOS\n\n       ```shell\n       python -m venv venv\n       ```\n\n3. Install required packages\n\n   ```shell\n   venv/bin/pip install -r requirements.txt\n   ```\n\n4. Edit configuration [config.yml](#configyml)\n\n5. Run program by executing `main.py` script\n\n    * Windows\n\n       ```shell\n       venv\\Scripts\\python zstd_backup.py\n       ```\n\n    * Others\n\n       ```shell\n       venv/bin/python3 main.py\n       ```\n\n# config.yml\n\n\u003e This is where you specify the files/folders that are included in the compressed file.  \n\u003e Also the place where compressed file saved to.\n\n```yaml\n# Available levels: DEBUG, INFO, WARN, ERROR, FATAL\nconsole_log_level: INFO\n\n# All files and folders will be included\n# in the final compressed file.\ninclude:\n  - '/path/to/compress'\n\n# Where to save this backup.\n# Must be a path (program creates dirs if path not exist)\ndestination: \"./backups\"\n\n# Ignore all files that start with 1 of the paths below.\n# Must be in absolute form.\n# If '/path/to/ignore' is listed, any sub-folders and files\n# within that directory will be ignored.\n# Since v0.0.3, you can use regular expression to ignore files.\n# For regex to match the entire path, use colons:\n# - ':ignore-\\d+:'\n# 'ignore-1' matches the pattern but not '/path/to/ignore-1'\n# For regex to find matches in a string, use semi-colon:\n# - ';ignore-\\d+;'\n# will match both 'ignore-1' and '/path/to/ignore-1'\nignore: []\n\nold_backups:\n  # How many backups should I keep (default: 5, 0 means unlimited)\n  keep: 5\n  # If a backup's creation date exceeds this number, it'll be deleted.\n  # Set this to 0 to skip this process\n  retention: 30   # Days\n  # Should this program delete older backups (even if it was\n  # within retention days and total files less than 'keep')\n  # to save space for new backup.\n  # This option always keeps the most recent backup\n  # unless 'aggressive' is set to True.\n  remove_old_backups_for_space: true\n  # If True, delete to the last backup to make some space for new backup\n  aggressive: false\n\narguments:\n  # Compression level.\n  # Higher values are slower but yield smaller size.\n  # Default level is 3\n  # More at: https://python-zstandard.readthedocs.io/en/latest/compressor.html#zstdcompressor\n  level: 3\n  # How many cores should the algo use.\n  # More threads equals faster compression time.\n  # 0 will use all threads (also the default)\n  threads: 4\n\nsettings:\n  # Program will attempt to write to compressed\n  # file this many bytes per cycle.\n  # Higher number can cause I/O bottleneck\n  # If you're unsure, leave it at default 1024\n  write_chunk: 1024   # bytes\n  # Settings related to progress bar\n  # This function is still in Beta\n  progress_bar:\n    # Enabling progress bar may\n    # result in slower write.\n    enabled: true\n\n# Send compressed file to remote server\nremote_storage:\n  enabled: false\n  # As of version 0.1.0, only SFTP is supported\n  type: SFTP\n  server:\n    host: '127.0.0.1'\n    port: 22\n  credentials:\n    # Available protocols: PASSWORD, DSS, ED25519, RSA, ECDSA\n    # PASSWORD requires presence of 'password' field,\n    # others require 'keypath' and 'passphrase'\n    # Leave 'passphrase' empty if key isn't encrypted with one.\n    protocol: 'ED25519'\n    # Automatically switch to public/private key\n    # once 'private_key' is filled out.\n    username: username\n    keypath: ''\n    passphrase: ''\n  # Path must contain name you want the file to be\n  # '{}' will be replaced by the original name.\n  remote_path: '/remote/location/compressed.zstd'\n  # File won't be deleted if error occurs during transfer\n  delete_after_transfer: false\n```\n\n# Issues\n\nIf you have any question, please open a ticket [HERE](https://github.com/knighthat/linux-server-backup/issues)\n\n# License\n\nThis repo is licensed under MIT. Feel free to use, modify, and re-distribute without restrictions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknighthat%2Fzstd-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknighthat%2Fzstd-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknighthat%2Fzstd-backup/lists"}