{"id":13706546,"url":"https://github.com/asdfjkl/yahb","last_synced_at":"2026-01-29T19:03:10.658Z","repository":{"id":56206341,"uuid":"226579467","full_name":"asdfjkl/yahb","owner":"asdfjkl","description":"Deduplicating File-Copy/Backup Tool (Commandline)","archived":false,"fork":false,"pushed_at":"2025-12-19T10:33:51.000Z","size":4529,"stargazers_count":13,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-21T08:18:49.270Z","etag":null,"topics":["backup","commandline","hardlink","ntfs","rsync-backup","rsyncbackup","volume-shadow-copy","windows"],"latest_commit_sha":null,"homepage":"https://github.com/asdfjkl/yahb","language":"C#","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/asdfjkl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-07T21:40:15.000Z","updated_at":"2025-12-19T10:33:55.000Z","dependencies_parsed_at":"2024-04-09T20:44:20.170Z","dependency_job_id":"34fdf167-f565-48ab-9da3-67aceae21722","html_url":"https://github.com/asdfjkl/yahb","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/asdfjkl/yahb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asdfjkl%2Fyahb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asdfjkl%2Fyahb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asdfjkl%2Fyahb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asdfjkl%2Fyahb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asdfjkl","download_url":"https://codeload.github.com/asdfjkl/yahb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asdfjkl%2Fyahb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28882632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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","commandline","hardlink","ntfs","rsync-backup","rsyncbackup","volume-shadow-copy","windows"],"created_at":"2024-08-02T22:00:59.716Z","updated_at":"2026-01-29T19:03:10.647Z","avatar_url":"https://github.com/asdfjkl.png","language":"C#","funding_links":["https://www.paypal.com/donate?hosted_button_id=9K2JDF5YBDZT6"],"categories":["C# #"],"sub_categories":[],"readme":"# YAHB - Yet Another Hardlink-based Backup-tool\n\nYAHB is a deduplicating file copy tool, intended for backup use. Deduplication works on the file-level with NTFS [hardlinks](https://en.wikipedia.org/wiki/Hard_link).\n\n## Download \u0026 Installation\n\nThe latest release is available [HERE](https://github.com/asdfjkl/yahb/releases).\n\nYAHB is also available via [winget](https://en.wikipedia.org/wiki/Windows_Package_Manager). Simply open a command prompt and run\n\n    winget install asdfjkl.YAHB\n\n## Example \n\nConsider the following scenario: Your have a folder\n\n    C:\\MyFiles\n    \nfor which you want to create backups. Assume for simplicity that the folder contains only two files:\n\n    C:\\MyFiles\\movie.avi (huge 600 MB movie file)\n    C:\\MyFiles\\todo.txt  (your todo-list, few kilobytes)\n\nThe large `movie.avi` doesn't change. Your `todo.txt` is changed almost daily, but it's only a very small file. Let's further assume, it's March 1st, 2019, the current time is 15:12, and you are creating backup with YAHB to `F:\\Backup`. Then YAHB will simply copy `C:\\MyFiles` as follows:\n\n    F:\\Backup\\201903011512\\C__\\MyFiles\\movie.avi\n    F:\\Backup\\201903011512\\C__\\MyFiles\\todo.txt\n    \nSuppose the next day (March 2nd, same time) you want to create another backup to the same location. The file `todo.txt` has changed inbetween, but the file `movie.avi` has not. YAHB will locate the last previous backup folder, and identify those files that changed, and those that didn't. Running YAHB again will result in the following backup:\n\n    F:\\Backup\\201903021512\\C__\\MyFiles\\movie.avi -\u003e hardlink to F:\\Backup\\201903011512\\C__\\MyFiles\\movie.avi\n    F:\\Backup\\201903021512\\C__\\MyFiles\\todo.txt\n    \nThe folder `F:\\Backup\\201903021512` now only takes a few kilobytes, instead of 600 MB, since `movie.avi` is only stored once on the drive `F:`, but two NTFS hardlinks are pointing to it.\n\nMoreover:\n\n* If at some point, you decide to delete the folder `F:\\Backup\\201903011512` (but keep `F:\\Backup\\201903021512`), NTFS will detect that there is a hardlink pointing to `movie.avi`. It will delete the folder, but keep `movie.avi` on the disk. Same for the other way round.\n* You always have a 1:1 copy of your current files at hand. In case of a disaster, there is no proprietary backup format to extract from, re-order your file structure etc. In the above example, just copy the latest version of `MyFiles` back, and all your data are there - maximum recoverability.\n* If a file is currently locked (i.e. opened for read/write), YAHB supports to still create a copy of that file using [Windows Volume Shadow Copy Service](https://en.wikipedia.org/wiki/Shadow_Copy). This is useful, if you want to create a backup in the background while working with the computer, i.e. creating backups of documents while you have them still open in Word/[LibreOffice](https://www.libreoffice.org), or creating a backup of your Thunderbird or Firefox [Profile folder](https://www.howtogeek.com/255587/how-to-find-your-firefox-profile-folder-on-windows-mac-and-linux/), while still writing mails or browsing the web.\n\n## Installation\n\nJust unzip to a folder, open a command-prompt and run `yahb`.\n\n## Requirements\n\nYAHB is currently 64 bit only. YAHB will likely run fine on Windows 7 and 8.1, but only Windows 10 and 11 is supported.\n\n* When copying to a *locally attached drive*, the target drive MUST be NTFS-formatted. Otherwise hardlinks cannot be created.\n* When copying to a *network share*, things are more complicated. Basically the underlying file system must support hardlinks, and must expose hardlink creation in such a way, that Windows API commands can be used to create hardlinks. This is supported with i.e. SAMBA when [Unix Extensions](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#UNIXEXTENSIONS) are enabled. Fortunately, most typical NAS solutions like Synology or QNAP suport this and work out-of-the-box.\n\nYAHB requires [Microsoft NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework) or higher. The following versions of Windows ship with suitable versions of NET Framwework by default, i.e. you don't need to install anything if you run:\n- Windows 10, version 1809 and later\n\nIf you are running an earlier version of Windows, download and install the latest [Microsoft NET Framework](https://dotnet.microsoft.com/download/dotnet-framework) [here](https://dotnet.microsoft.com/download/dotnet-framework).\n\nOnly if you want to make use of [Windows Volume Shadow Copy Service](https://en.wikipedia.org/wiki/Shadow_Copy) to copy files currently in use, you need to additionally install [Microsoft Visual Studio C++ 2019 Redistributable]( https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads). You need the version for 64bit systems, i.e. `vc_redist.x64.exe`. Note that it's very likely that this is already installed on your system by other programs.\n\n## Restrictions\n\nWindows via default has a `MAX_PATH` restriction, i.e. [can't handle path names longer than 260 characters](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation) - a relict from old MS-DOS times. \nSince YAHB keeps the original folder structure but in addition adds a timestamp and drive letter -- like e.g. `F:\\Backup\\201903021512\\C__\\MyFiles` it is possible to run into problems as the destination path is then longer than 260 characters.\n\nThere are two possible workarounds:\n * keep the maximal path length in mind and if required shorten folder names prior to creating a backup.\n * For YAHB version 1.0.5 or later: Windows 10, version 1607 and later are able to remove the `MAX_PATH` restriction via a registry entry. Locate `HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem` and look for an entry called `LongPathsEnabled`. Change that value to `1` if it isn't already set to `1`. \n \n **Note**: When backing up to a *network drive* (i.e. SAMBA), it is unclear if long paths (\u003e 260 characters) work in practice with YAHB 1.0.5. and the above mentioned registry entry. Feedback is appreciated!\n \n## Donate\n\nYou can support the development of YAHB by donating via Paypal.\n\n[![paypal](https://www.paypalobjects.com/en_US/DK/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?hosted_button_id=9K2JDF5YBDZT6)\n\n## Usage\n\nNote: To use the option `/vss` you MUST run YAHB with elevated rights, i.e. from an elevated command prompt (`Run as Administrator`).\n\n```\n\nYAHB (Yet Another Hardlink-based Backup-Tool)\nVersion 1.1.0.0\nCopyright (c) 2019 - 2025 Dominik Klein\n\n     Syntax:: yahb.exe /src:\u003csource-dir\u003e /dest:\u003ctarget-dir\u003e [\u003coptions\u003e]\n\n source-dir:: source directory (i.e. C:\\MyFiles)\n target-dir:: target directory (i.e. D:\\Backups)\n\nTYPICAL EXAMPLE:\n\n yahb /src:c:\\MyFiles /dest:d:\\Backup /r /xf:*.tmp\n\nwill copy all files and the directory structure from c:\\MyFiles\nto d:\\Backup\\YYYYMMDDHHMM, including all subdirectories. Yahb will\nalso look for previous backups of c:\\MyFiles in d:\\Backup, and if\na file has not changed, it will create a hardlink to that location.\nMoreover, all files with ending .tmp will be skipped.\n\nOPTIONS\n\n  /src:DIR1;DIR2;...       :: copy source directories DIR1, DIR2, etc.\n                              surround directories with spaces by \" and separate\n                              each directory by ;\n  /dest:DIR                :: destination directory\n  /copyall                 :: copy ALL files. Otherwise the following directory\n                              patterns and file types are excluded:\n\n                              DIRECTORIES:\n                              - 'System Volume Information'\n                              - 'AppData\\Local\\Temp'\n                              - 'AppData\\Local\\Microsoft\\Windows\\INetCache'\n                              - 'C:\\Windows'\n                              - '$Recycle.Bin'\n\n                              FILES AND PLACEHOLDERS:\n                              - hiberfil.sys\n                              - pagefile.sys\n                              - swapfile.sys\n                              - *.~\n                              - *.temp\n\n  /files:PAT1;PAT2;...     :: copy only files that match the supplied\n                              file patterns (like *.exe)\n\n  /help                    :: display this help screen\n\n  /list                    :: do not copy anything, just list all files\n\n  /log:FILENAME            :: write all output (log) to a textfile FILNAME.\n                              If FILENAME exists, it will be overwritten\n\n  /+log:FILENAME           :: same as /log:FILENAME, but always append, i.e.\n                              do not not overwrite FILENAME if it exists.\n\n  /pause                   :: after finishing, wait for the user to press\n                              ENTER before closing the program. This\n                              prevents a command - prompt from vanishing\n                              after finishing if run e.g. by Windows' RUNAS\n                              command\n\n  /r                       :: also copy recursively all SUBDIRECTORIES of \u003csource-dir\u003e\n\n  /tee                     :: even if /log:FILENAME or /+log:FILENAME is\n                              chosen, still write everything additionally\n                              to console output.\n\n  /verbose                 :: by default, only the progress and errors\n                              are output to the console/log. In verbose\n                              mode, all created files and directories\n                              are listed - note that for large copy\n                              operations, this frequent output to console\n                              will slow down the overal operation\n\n  /vss                     :: If a file is currently in use, and cannot be\n                              accessed, try to still copy that file by using\n                              Windows' Volume Shadow Copy Service.\n                              YOU NEED TO RUN YAHB WITH ELEVATED (ADMIN)\n                              RIGHTS FOR THIS TO WORK.\n\n  /xd:DIR1;DIR2;...        :: eXclude directories dir1, dir2, and so forth.\n                              I.e. if DIR is provided here, any (full)\n                              directory path that contains DIR is skipped\n\n  /xf:PAT1;PAT2;...        :: eXclude files with filename PAT1, PAT2 and so\n                              forth. PAT can also be a file pattern like *.tmp\n\n  /?                       :: display this help screen\n\n\n````\n\n## Scripting\n\nYou can of course use `yahb` for batch operations or automation. If you want to manually backup, it can be helpful to create a `.bat` file, put \nit e.g. on the desktop and then run a backup by just double clicking. Here is sample code for a file `backup.bat` that elevates the execution\nto run with administrator privileges, so that the `/vss` option can be used. Just adjust the directory names and destination path.\n\n````\n@echo off\nREM Check if running as administrator\nnet session \u003enul 2\u003e\u00261\nif %errorlevel% neq 0 (\n    echo Requesting administrator privileges...\n    powershell Start-Process \"%~f0\" -Verb RunAs\n    exit\n)\necho Running as administrator!\n\"C:\\Program Files\\yahb\\yahb.exe\" /src:\"C:\\Myfiles;C:\\SomeOtherFiles\" /dest:F: /r /vss /pause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasdfjkl%2Fyahb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasdfjkl%2Fyahb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasdfjkl%2Fyahb/lists"}