github.com/MojtabaTajik/Hamster

Cross-platform agent to backup directories to AmazonS3 object storage

Open this visualization on its own page →

Contributors

1

Lines of Code

82

From

2022-06-18

To

2022-07-16

About MojtabaTajik/Hamster

Hamster is a cross-platform backup agent written in C# that automates the process of compressing and uploading directory backups to Amazon S3 object storage. The tool uses a JSON configuration file to define backup operations, including S3 credentials, bucket names, and the directories to be backed up. It supports dynamic variable substitution at runtime, allowing users to customize bucket and file naming with operation names and timestamps, with an option to use the Hijri calendar instead of the Gregorian calendar for date formatting.

The application works by creating a temporary directory named after the operation, allowing backup scripts or commands to populate it with files, which Hamster then compresses and uploads to S3 once the operation completes. Users trigger backups by passing an operation name as a command-line argument to the executable. The project is designed to integrate with CI/CD pipelines like Jenkins, where scheduled CRON jobs can trigger backups across multiple servers without requiring manual configuration on each machine. The documentation emphasizes security best practices, recommending that the configuration file containing database credentials and S3 secrets be removed from servers after each execution to prevent unauthorized access.

Share this video