{"id":25436676,"url":"https://github.com/ah-ibrahim/backup-script","last_synced_at":"2026-04-20T10:32:18.856Z","repository":{"id":277630159,"uuid":"933026437","full_name":"Ah-Ibrahim/Backup-Script","owner":"Ah-Ibrahim","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-15T02:23:31.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T03:22:16.246Z","etag":null,"topics":["bash","bash-script","operating-system"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ah-Ibrahim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-15T01:14:30.000Z","updated_at":"2025-02-15T02:23:34.000Z","dependencies_parsed_at":"2025-02-15T03:22:18.763Z","dependency_job_id":"545b0812-c08e-4e5b-be76-5a7c5fc403ae","html_url":"https://github.com/Ah-Ibrahim/Backup-Script","commit_stats":null,"previous_names":["ah-ibrahim/backup-script"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FBackup-Script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FBackup-Script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FBackup-Script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FBackup-Script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ah-Ibrahim","download_url":"https://codeload.github.com/Ah-Ibrahim/Backup-Script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264766,"owners_count":22041794,"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":["bash","bash-script","operating-system"],"created_at":"2025-02-17T08:21:37.909Z","updated_at":"2026-04-20T10:32:18.806Z","avatar_url":"https://github.com/Ah-Ibrahim.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup and Restore\n\nA simple backup and restore systems for managing a directory versions.\n\n## Overview\nIt consists of two systems, backup and restore. All files are directly found inside *main directory* which should also contains source and backup directory.\n\nPlease note that two systems **do not work** concurrently.\n#### 1. Backup\nBackup is done using a shell script `backupd.sh`, it takes 4 arguments in this order:\n1. `source_dir`: directory to be tracked and backed up.\n2. `backup_dir`: directory to store backups.\n3. `interval_secs`: interval between each check for changes\n4. `max_backups`: max number of backups to have (older backups will be deleted to retain max number).\n\n`source_dir` is checked every `interval_secs`, make a new backup if changes were made to it inside `backup_dir`.\n\n#### 2. Restore\nRestore is done using shell script `restore.sh`, it takes two arguments in this order:\n1. `source_dir`: directory to be restored.\n2. `backup_dir`: directory containing backups.\n\nWhen restore is used, by default the newest backup is restored, putting its content inside `source_dir`.\n\nPlease note that restore **stops** backup process and vice versa.\n\n## Prerequisites\nUser may need to install `make` command: `sudo apt install make`, to be able to run Makefile.\n\n## Instructions\nAll of commands required to run backup or restore have been grouped inside Makefile, making it very easy to use.\n#### For Backup\nSimply inside main directory (which contains all working files like Makefile but also source and backup directory), run `make` or `make backup`.\n\nThis should start tracking source directory, create an initial backup and create backups if any changes were made to it inside backup directory.\n\nIf backup directory was not found, it will be created.\n\n#### For Restore\nInside main directory, run `make restore`.\n\nThis should stop backup system, restore newest backup version and gives user a menu to choose from different backups (sorted from oldest to newest).\n\nEnter `1` to select previous version, Enter `2` to select next version and finally `3` to exit.\n\n#### For Clearing\nInside main directory, use `make clear` to clear all working files, backups and stop backup or restore.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fah-ibrahim%2Fbackup-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fah-ibrahim%2Fbackup-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fah-ibrahim%2Fbackup-script/lists"}