{"id":23498591,"url":"https://github.com/eehakkin/rsync-backup","last_synced_at":"2025-04-23T12:12:59.499Z","repository":{"id":5931198,"uuid":"7151208","full_name":"eehakkin/rsync-backup","owner":"eehakkin","description":"versatile rsync based backup scripts with minimal dependencies","archived":false,"fork":false,"pushed_at":"2024-08-12T12:07:10.000Z","size":383,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T12:12:40.867Z","etag":null,"topics":["backup","incremental-backup","incremental-backups","rsync","rsync-backup","rsync-backups"],"latest_commit_sha":null,"homepage":"https://eehakkin.github.io/rsync-backup/","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/eehakkin.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}},"created_at":"2012-12-13T16:16:45.000Z","updated_at":"2024-08-12T12:07:13.000Z","dependencies_parsed_at":"2024-08-12T01:25:42.653Z","dependency_job_id":null,"html_url":"https://github.com/eehakkin/rsync-backup","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/eehakkin%2Frsync-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehakkin%2Frsync-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehakkin%2Frsync-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehakkin%2Frsync-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eehakkin","download_url":"https://codeload.github.com/eehakkin/rsync-backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250430595,"owners_count":21429324,"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":["backup","incremental-backup","incremental-backups","rsync","rsync-backup","rsync-backups"],"created_at":"2024-12-25T05:37:23.389Z","updated_at":"2025-04-23T12:12:59.466Z","avatar_url":"https://github.com/eehakkin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"rsync-backup\n============\n\nVersatile **rsync**(1) based backup scripts with minimal dependencies.\n\nThe newly created backup directories are named according to the backup\ndate and time and are full backup directories containing direct (but\npossible filtered) copies of original files and directories. They can\nthus be accessed and restored directly.\n\nOld backup directories are deleted based on pattern matching and ages.\nThe default is to keep secondly, minutely and hourly backup directories\nfor at most one day covering hours since the last daily backup, daily\nbackup directories for at least one week covering days since the last\nweekly backup, weekly backup directories for at least one month covering\nweeks since the last monthly backup, monthly backup directories for at\nleast one year covering months since the last yearly backup and yearly\nbackup directories forever.\n\nDisk usage is minimised and transfers are speeded up by hard linking\nfiles from old backup directories to newly created backup directories.\n\nRequirements\n------------\n\nMinimum requirements:\n - Essential POSIX-compiliant utilities\n   **[**(1),\n   **basename**(1),\n   **cat**(1),\n   **chgrp**(1),\n   **chmod**(1),\n   **cp**(1),\n   **dirname**(1),\n   **echo**(1),\n   **find**(1),\n   **grep**(1),\n   **id**(1),\n   **ln**(1),\n   **ls**(1),\n   **mkdir**(1),\n   **mv**(1),\n   **printf**(1),\n   **rm**(1),\n   **rmdir**(1),\n   **sed**(1),\n   **sh**(1),\n   **sync**(1),\n   **tr**(1) and\n   **uname**(1)\n - **rsync**(1):        To copy files.\n\nOptional requirements:\n - **duperemove**(1):   To deduplicate file extends.\n - **hostname**(1):     To get the system's hostname.\n - **ionice**(1):       To set idle I/O priority.\n - **jdupes**(1):       To deduplicate file extends.\n - **nice**(1):         To add niceness.\n - **nocache**(1):      To minimize the effect on file system cache.\n - **on_ac_power**(1):  To test whether computer is running on AC power.\n - **renice**(1):       To readd niceness.\n - **ssh**(1):          To copy files from another host.\n - **fmt**(1),\n   **help2man**(1),\n   **man**(1),\n   **tput**(1):         To format help messages.\n\nInstallation\n------------\n\n 1. Download and extract files.\n     - Choose one method:\n        1. Clone the repository with **git**(1):\n           ```sh\n           git clone https://github.com/eehakkin/rsync-backup.git\n           ```\n        2. Download\n           a [tarball](https://github.com/eehakkin/rsync-backup/tarball/main)\n           and extract files from it with **tar**(1) or with some other\n           archiving tool.\n        3. Download\n           a [zipball](https://github.com/eehakkin/rsync-backup/zipball/main)\n           and extract files from it with **unzip**(1) or with some other\n           archiving tool.\n     - Optionally, rename the directory.\n\nUsage\n-----\n\n 1. Change the working directory:\n    ```sh\n    cd -- rsync-backup\n    ```\n    Adapt accordingly if the directory is named differently.\n 2. Create proper configuration (at minimum the **[conf/backup-src-list]**\n    file):\n     - As a starting point, copy a sample backup source list:\n       ```sh\n       cp -v -- conf/examples/backup-src-list conf/\n       ```\n     - Optionally, edit the **conf/backup-src-list** file with any text\n       editor.\n     - Optionally, add more configuration files.\n       For details, see documentation in the **[conf/]** directory.\n 3. Create the first backup:\n    ```sh\n    tools/backup\n    ```\n    By default, the first run will create a yearly backup directory\n    (which is named according to the year). and the next runs will\n    create monthly, weekly, daily, hourly, minutely and secondly backup\n    directories until the next minute, hour, day, week, month or year.\n    For details, see documentation in the **[tools/]** directory.\n 4. Repeat the last step often enough such as daily, bihourly or hourly.\n    That can be automated with systemd timer units, crontabs or such.\n\nDirectory structure\n-------------------\n\n - **[conf/]**\n     A backup configuration directory.\n   - ...\n   - **[backup-src-list](conf/README.md#the-confbackup-src-list-file)**\n   - ...\n - **latest**\n     A symbolic link to the latest backup directory.\n - **tmp/**\n     A temporary directory.\n - **[tools/]**\n     A backup tool directory.\n   - **[backup]**:                create a new backup directory and do related tasks\n   - **[backup-clean-tmp]**:      clean up a temporary directory\n   - **[backup-copy]**:           copy backup directories\n   - **[backup-copy-rsync]**:     a backup copying oriented file-copying tool\n   - **[backup-create]**:         create a new backup directory\n   - **[backup-create-rsync]**:   a backup creation oriented file-copying tool\n   - **[backup-du]**:             estimate file space usage\n   - **[backup-help]**:           show backup tool help messages\n   - **[backup-make-tag]**:       construct a new backup directory name\n   - **[backup-mirror]**:         copy backup directories and do related tasks\n   - **[backup-mirror-sources]**: copy backup directories from mirror sources\n   - **[backup-nice]**:           run a backup command nicely\n   - **[backup-nologin]**:        politely refuse a login but allow a backup\n   - **[backup-prepare]**:        prepare for backups\n   - **[backup-purge]**:          delete old backup directories\n   - **[backup-rsync]**:          a backup-oriented file-copying tool\n   - **[backup-sources]**:        create a new backup directory from backup sources\n - \\\u003cYEAR\\\u003e/\n     A yearly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]\\\u003cMONTH\\\u003e/\n     A monthly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]**W**\\\u003cWEEK\\\u003e/\n     A weekly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]\\\u003cMONTH\\\u003e[**-**]\\\u003cDAY\\\u003e/\n     A daily backup directory.\n - \\\u003cYEAR\\\u003e[**-**]\\\u003cMONTH\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e/\n     An hourly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]\\\u003cMONTH\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e[**:**]\\\u003cMINUTE\\\u003e/\n     A minutely backup directory.\n - \\\u003cYEAR\\\u003e[**-**]\\\u003cMONTH\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e[**:**]\\\u003cMINUTE\\\u003e[**:**]\\\u003cSECOND\\\u003e/\n     A secondly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]**W**\\\u003cWEEK\\\u003e[**-**]\\\u003cDAY\\\u003e/\n     An alternative daily backup directory.\n - \\\u003cYEAR\\\u003e[**-**]**W**\\\u003cWEEK\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e/\n     An alternative hourly backup directory.\n - \\\u003cYEAR\\\u003e[**-**]**W**\\\u003cWEEK\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e[**:**]\\\u003cMINUTE\\\u003e/\n     An alternative minutely backup directory.\n - \\\u003cYEAR\\\u003e[**-**]**W**\\\u003cWEEK\\\u003e[**-**]\\\u003cDAY\\\u003e**T**\\\u003cHOUR\\\u003e[**:**]\\\u003cMINUTE\\\u003e[**:**]\\\u003cSECOND\\\u003e/\n     An alternative secondly backup directory.\n\n[conf/]: conf/\n[conf/backup-src-list]: conf/README.md#the-confbackup-src-list-file\n[conf/mirror-src-list]: conf/README.md#the-confmirror-src-list-file\n[tools/]: tools/\n[backup]: tools/README.md#backup\n[backup-clean-tmp]: tools/README.md#backup-clean-tmp\n[backup-copy]: tools/README.md#backup-copy\n[backup-copy-rsync]: tools/README.md#backup-copy-rsync\n[backup-create]: tools/README.md#backup-create\n[backup-create-rsync]: tools/README.md#backup-create-rsync\n[backup-du]: tools/README.md#backup-du\n[backup-help]: tools/README.md#backup-help\n[backup-make-tag]: tools/README.md#backup-make-tag\n[backup-mirror]: tools/README.md#backup-mirror\n[backup-mirror-sources]: tools/README.md#backup-mirror-sources\n[backup-nice]: tools/README.md#backup-nice\n[backup-nologin]: tools/README.md#backup-nologin\n[backup-prepare]: tools/README.md#backup-prepare\n[backup-purge]: tools/README.md#backup-purge\n[backup-rsync]: tools/README.md#backup-rsync\n[backup-sources]: tools/README.md#backup-sources\n\nBackup configuration\n--------------------\n\nSee documentation in the **[conf/]** directory.\n\nBackup tools\n------------\n\nSee documentation in the **[tools/]** directory.\n\nBackup scheduling\n-----------------\n\nThe backup scripts must be run often enough. That can be automated with\nsystemd timer units, crontabs or such.\n\nIf proper configuration exists in the **[conf/]** directory (at minimum\nthe **[conf/backup-src-list]** file), it is enough to run\n`/path/to/tools/backup` (see **[backup]**\\(1\\) for details) often enough\nsuch as daily, bihourly, or hourly.\n\nIf proper configuration does not exist, one has to create one (see the\ndocumentation in the **[conf/]** directory for details) or one has to\nrun `/path/to/tools/backup-create [\u003cRSYNC-OPTION\u003e]... \u003cSRC\u003e..` and\n`/path/to/tools/backup-purge [\u003cPATTERN\u003e=\u003cDAYS\u003e]...` (see\n**[backup-create]**\\(1\\) and **[backup-purge]**\\(1\\) for details).\n\nBackup mirror scheduling\n------------------------\n\nIf proper configuration exists in the **[conf/]** directory (at minimum\nthe **[conf/mirror-src-list]** file), it is enough to run\n`/path/to/tools/backup-mirror` (see **[backup-mirror]**\\(1\\) for\ndetails) often enough such as weekly or daily.\n\nIf proper configuration does not exist, one has to create one (see the\ndocumentation in the **[conf/]** directory for details) or one has to\nrun `/path/to/tools/backup-copy [\u003cRSYNC-OPTION\u003e]... \u003cSRC\u003e..` and\n`/path/to/tools/backup-purge [\u003cPATTERN\u003e=\u003cDAYS\u003e]...` (see\n**[backup-copy]**\\(1\\) and **[backup-purge]**\\(1\\) for details).\n\nCopyright\n---------\n\nCopyright (C) 2010 - 2024 Eero Häkkinen \u003cEero+rsync-backup@Häkkinen.fi\u003e\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License version 3\nas published by the Free Software Foundation.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feehakkin%2Frsync-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feehakkin%2Frsync-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feehakkin%2Frsync-backup/lists"}