{"id":23592595,"url":"https://github.com/filipnet/influxdb-auto-backup","last_synced_at":"2025-06-24T01:09:30.316Z","repository":{"id":198156903,"uuid":"700201656","full_name":"filipnet/influxdb-auto-backup","owner":"filipnet","description":"This repository contains a Bash script for automating backups of InfluxDB databases","archived":false,"fork":false,"pushed_at":"2024-07-23T13:27:44.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T19:47:30.009Z","etag":null,"topics":["automation","backup","database","influx","influxdb","influxdb2","linux","maintenance","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipnet.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":"2023-10-04T06:29:00.000Z","updated_at":"2025-02-21T15:46:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"02a0741f-b787-4964-bfc0-12cc9e143d48","html_url":"https://github.com/filipnet/influxdb-auto-backup","commit_stats":null,"previous_names":["filipnet/influxdb-auto-backup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/filipnet/influxdb-auto-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Finfluxdb-auto-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Finfluxdb-auto-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Finfluxdb-auto-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Finfluxdb-auto-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipnet","download_url":"https://codeload.github.com/filipnet/influxdb-auto-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Finfluxdb-auto-backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261584225,"owners_count":23180674,"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":["automation","backup","database","influx","influxdb","influxdb2","linux","maintenance","shell-script"],"created_at":"2024-12-27T08:14:48.040Z","updated_at":"2025-06-24T01:09:30.265Z","avatar_url":"https://github.com/filipnet.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# influxdb-auto-backup\nAutomate your InfluxDB backups with this simple Bash script. This script allows you to schedule regular backups for multiple InfluxDB databases, providing a convenient way to safeguard your data. You can customize backup settings, including the retention period for your backups.\n\n## Features\n\n- **Automated Backups:** Schedule automated backups for one or more InfluxDB databases.\n- **Custom Retention:** Set a retention period to manage how long your backups are kept.\n- **Easy Configuration:** Configure your InfluxDB server details and backup settings in one place.\n- **Portable Backups:** The script creates portable and compressed backup files for easy storage and transfer.\n\n## Usage\n\n1. **Clone the Repository:** ```git clone https://github.com/filipnet/influxdb-auto-backup.git```\n2. **Navigate to the Repository:** ```cd influxdb-auto-backup```\n3. **Configure the Script:** - see the [Configuration] file for details.\n4. **Run the Script:** ```./backup-script.sh```\n5. **Verify Backups:** ```Check the specified `BACKUP_DIR` to ensure that your backups have been created successfully.```\n\n## Configuration\nCreate config.sh\nBefore running the backup script, you need to create a config.sh file with your InfluxDB server details and backup settings. Here's how you can create the configuration file using the provided example:\n\n- Navigate to the Repository: ```cd influxdb-auto-backup```\n- Rename ```config.sh.example``` to ```config.sh``` and open it in a text editor.\n- Edit Configuration Variables:\nUpdate the following variables in config.sh with your InfluxDB server details and backup settings:\n```\n#!/bin/bash\n\n# InfluxDB Settings\nINFLUXDB_TOKEN=\"your_influxdb_token\"\nINFLUXDB_ORG=\"your_influxdb_org\"\nBUCKETS=(\"bucket1\" \"bucket2\" \"bucket3\")  # List of buckets to be backed up\n\n# Backup Settings\nBACKUP_DIR=\"/path/to/backup/directory\"\nRETENTION_DAYS=7\n```\n\nMake sure to replace \"your_influxdb_token\", \"your_influxdb_org\", and the bucket names with your actual InfluxDB authentication token, organization name, and bucket names respectively.\n\n## Schedule Automated Backups using /etc/crontab:\n\nOpen /etc/crontab in a text editor as root: ```sudo nano /etc/crontab```\nAdd the following line to schedule the backup script daily at 2:00 AM and redirect the output to /dev/null to suppress any messages:\n```\n0 2 * * * root /root/influxdb-auto-backup/influxdb-auto-backup.sh \u003e /dev/null 2\u003e\u00261\n```\nMake sure to replace /root/influxdb-auto-backup/influxdb-auto-backup.sh with the actual path to your backup-script.sh file.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and create a pull request with your changes.\n\n## License\n\nThis project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Finfluxdb-auto-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipnet%2Finfluxdb-auto-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Finfluxdb-auto-backup/lists"}