{"id":44537729,"url":"https://github.com/devcavin/backup-tool","last_synced_at":"2026-02-13T18:52:08.573Z","repository":{"id":336826684,"uuid":"1146931862","full_name":"devcavin/backup-tool","owner":"devcavin","description":"Simple Backup System","archived":false,"fork":false,"pushed_at":"2026-02-06T09:48:50.000Z","size":9,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-06T17:42:03.917Z","etag":null,"topics":["backup-tool","backup-utility","java","maven"],"latest_commit_sha":null,"homepage":"","language":"Java","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/devcavin.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T23:02:11.000Z","updated_at":"2026-02-06T13:20:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devcavin/backup-tool","commit_stats":null,"previous_names":["devcavin/backup-tool"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devcavin/backup-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fbackup-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fbackup-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fbackup-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fbackup-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devcavin","download_url":"https://codeload.github.com/devcavin/backup-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcavin%2Fbackup-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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-tool","backup-utility","java","maven"],"created_at":"2026-02-13T18:52:08.307Z","updated_at":"2026-02-13T18:52:08.545Z","avatar_url":"https://github.com/devcavin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup Tool\n\nA Java-based automated backup tool that creates compressed ZIP archives of directories with support for both one-time and scheduled backups.\n\n## Features\n\n- Create compressed ZIP backups of directories\n- One-time backup execution\n- Scheduled automatic backups (cron-like)\n- Command-line interface\n- Easy-to-use startup scripts\n- Clean Domain-Driven Design architecture\n\n## Prerequisites\n\n- Java 21 or higher\n- Maven 3.6 or higher\n\n## Building the Project\n\n```bash\nmvn clean package\n```\n\nThis will create an executable JAR file at `target/backup-tool-1.0-SNAPSHOT.jar`\n\n## Usage\n\n### Option 1: Using Startup Scripts (Recommended)\n\n#### Linux/Mac\n\n```bash\n# Make the script executable\nchmod +x backup.sh\n\n# One-time backup\n./backup.sh /path/to/source /path/to/destination\n\n# Scheduled backup (every 5 minutes for testing)\n./backup.sh /path/to/source /path/to/destination 5\n\n# Or edit the script to set default values and run\n./backup.sh\n```\n\n#### Windows\n\n```cmd\n# One-time backup\nbackup.bat C:\\path\\to\\source C:\\path\\to\\destination\n\n# Scheduled backup (every 5 minutes for testing)\nbackup.bat C:\\path\\to\\source C:\\path\\to\\destination 5\n\n# Or edit the script to set default values and run\nbackup.bat\n```\n\n### Option 2: Direct JAR Execution\n\n```bash\n# One-time backup\njava -jar target/backup-tool-1.0-SNAPSHOT.jar /path/to/source /path/to/destination\n\n# Scheduled backup (every 5 minutes)\njava -jar target/backup-tool-1.0-SNAPSHOT.jar /path/to/source /path/to/destination 5\n```\n\n## Arguments\n\n1. **source** (required) - The directory you want to backup\n2. **destination** (required) - The directory where backups will be stored\n3. **interval_minutes** (optional) - If provided, runs backup every N minutes. If omitted, runs once and exits.\n\n## Examples\n\n### One-time Backup\n\n```bash\n# Backup your Documents folder to a Backups directory\njava -jar target/backup-tool-1.0-SNAPSHOT.jar ~/Documents ~/Backups\n```\n\n### Scheduled Backup (Testing - Every 5 Minutes)\n\n```bash\n# Run backup every 5 minutes (good for testing)\njava -jar target/backup-tool-1.0-SNAPSHOT.jar ~/Documents ~/Backups 5\n```\n\n### Scheduled Backup (Production - Every Hour)\n\n```bash\n# Run backup every 60 minutes\njava -jar target/backup-tool-1.0-SNAPSHOT.jar ~/Documents ~/Backups 60\n```\n\n### Scheduled Backup (Daily)\n\n```bash\n# Run backup every 24 hours (1440 minutes)\njava -jar target/backup-tool-1.0-SNAPSHOT.jar ~/Documents ~/Backups 1440\n```\n\n## How It Works\n\n1. The tool creates a ZIP archive of the source directory\n2. The archive is stored in the destination directory with a timestamp\n3. Format: `backup-\u003ctimestamp\u003e.zip`\n4. For scheduled mode, the process runs in the background at the specified interval\n5. Press Ctrl+C to stop the scheduled backup service\n\n## Project Structure\n\n```\nbackup-tool/\n├── src/main/java/io/github/devcavin/\n│   ├── App.java                           # Main application entry point\n│   ├── application/usecase/               # Use case layer\n│   │   ├── CreateBackupJobUseCase.java\n        ├── ListArchiveUseCase.java\n│   │   ├── RunBackupJobUseCase.java\n│   │   └── ListBackupJobsUseCase.java\n│   ├── domain/                            # Domain layer\n│   │   ├── entity/\n│   │   │   ├── BackupJob.java\n│   │   │   └── Archive.java\n│   │   ├── repository/\n│   │   │   ├── BackupJobRepository.java\n│   │   │   └── ArchiveRepository.java\n│   │   ├── service/\n│   │   │   ├── BackupService.java\n│   │   │   ├── ArchiveCreator.java\n│   │   │   └── ArchiveStorage.java\n│   │   ├── valueobject/\n│   │   │   ├── BackupName.java\n│   │   │   ├── SourcePath.java\n│   │   │   └── DestinationPath.java\n│   │   └── enums/\n│   │       └── BackupStatus.java\n│   └── infrastructure/                    # Infrastructure layer\n│       ├── archive/local/\n│       │   ├── LocalArchiveCreator.java\n│       │   └── LocalArchiveStorage.java\n│       ├── repository/memory/\n│       │   ├── InMemoryBackupJobRepository.java\n│       │   └── InMemoryArchiveRepository.java\n│       └── scheduler/\n│           └── ScheduledBackupService.java\n├── backup.sh                              # Linux/Mac startup script\n├── backup.bat                             # Windows startup script\n├── pom.xml\n└── README.md\n```\n\n## Customizing Defaults\n\nEdit the startup scripts to set your preferred default values:\n\n**backup.sh** (Linux/Mac):\n```bash\nDEFAULT_SOURCE=\"/home/user/documents\"\nDEFAULT_DESTINATION=\"/home/user/backups\"\nDEFAULT_INTERVAL=\"\"  # or set to number for scheduled\n```\n\n**backup.bat** (Windows):\n```cmd\nset DEFAULT_SOURCE=C:\\Users\\%USERNAME%\\Documents\nset DEFAULT_DESTINATION=C:\\Users\\%USERNAME%\\Backups\nset DEFAULT_INTERVAL=\n```\n\n## Running as a Background Service\n\n### Linux (systemd)\n\nCreate a service file `/etc/systemd/system/backup-tool.service`:\n\n```ini\n[Unit]\nDescription=Automated Backup Service\nAfter=network.target\n\n[Service]\nType=simple\nUser=yourusername\nWorkingDirectory=/path/to/backup-tool\nExecStart=/usr/bin/java -jar /path/to/backup-tool/target/backup-tool-1.0-SNAPSHOT.jar /source /destination 60\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen:\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable backup-tool\nsudo systemctl start backup-tool\n```\n\n### Windows (Task Scheduler)\n\n1. Open Task Scheduler\n2. Create Basic Task\n3. Set trigger to \"When the computer starts\"\n4. Action: Start a program\n5. Program: `javaw.exe`\n6. Arguments: `-jar C:\\path\\to\\backup-tool.jar C:\\source C:\\destination 60`\n\n## License\n\nMIT License\n\n## Contributing\n\nPull requests are welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcavin%2Fbackup-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevcavin%2Fbackup-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcavin%2Fbackup-tool/lists"}