{"id":15933716,"url":"https://github.com/hardware/mysql-glacier","last_synced_at":"2025-04-10T19:30:25.981Z","repository":{"id":151489520,"uuid":"50752985","full_name":"hardware/mysql-glacier","owner":"hardware","description":"MySQL database backup tool using Amazon Glacier (with glacier-cli) and docker","archived":false,"fork":false,"pushed_at":"2016-02-05T22:17:39.000Z","size":4,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T07:25:08.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/hardware/mysql-glacier/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardware.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}},"created_at":"2016-01-31T01:07:48.000Z","updated_at":"2018-03-01T17:08:56.000Z","dependencies_parsed_at":"2023-04-28T02:18:41.483Z","dependency_job_id":null,"html_url":"https://github.com/hardware/mysql-glacier","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/hardware%2Fmysql-glacier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardware%2Fmysql-glacier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardware%2Fmysql-glacier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardware%2Fmysql-glacier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardware","download_url":"https://codeload.github.com/hardware/mysql-glacier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281395,"owners_count":21077423,"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":[],"created_at":"2024-10-07T02:41:47.539Z","updated_at":"2025-04-10T19:30:25.687Z","avatar_url":"https://github.com/hardware.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hardware/mysql-glacier\n\n![mysql-glacier](https://i.imgur.com/sBd2xLA.png \"mysql-glacier\")\n\nThis tool provides a command line interface to create periodic backups of your MySQL databases and upload\nthem to Amazon Glacier for archiving and long-term backup.\n\n#### IN DEVELOPEMENT !\n\n### Requirement\n\n- Amazon Web Services account\n- Docker 1.0 or higher\n- MySQL database\n\n### Installation\n\n```\ndocker pull hardware/mysql-glacier\nmkdir -p ~/.config/mysql-glacier\n```\n\nInside your shell config file, add a new alias :\n\n```\nalias glacier='docker run --rm -i \\\n  --env-file ~/.config/mysql-glacier/.aws \\\n  -v ~/.cache/glacier-cli:/root/.cache/glacier-cli \\\n  hardware/mysql-glacier'\n```\n\nCreate an `.aws` file with your AWS credentials, you’ll need retrieve your **Access Key ID**\nand **Secret Access Key** from the web-based console, use the IAM module (Identity\nand Access Management).\n\n```\n# ~/.config/mysql-glacier/.aws\n\nAWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx\nAWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxx\n```\n\nDon't forget to set permissions and immutable bit, then source your shell config file :\n\n```\nchmod 600 ~/.config/mysql-glacier/.aws\nchattr +i ~/.config/mysql-glacier/.aws\n. ~/.bashrc\n```\n\n### Environment variables\n\n- **AWS_ACCESS_KEY_ID** = Amazon Access Key ID (**required**)\n- **AWS_SECRET_ACCESS_KEY** = Amazon Secret Access Key (**required**)\n- **GLACIER_VAULT_NAME** = Glacier vault name (*optional*, default: default)\n- **DBHOST** = MySQL instance ip/hostname (*optional*, default: mysql)\n- **DBPORT** = MySQL instance port (*optional*, default: 3306)\n- **DBUSER** = MYSQL database username (**required**)\n- **DBNAME** = MYSQL database name (**required**)\n- **DBPASS** = MYSQL database password (**required**)\n- **DBSITE** = MYSQL database website name (*optional*, default: main)\n\n### Usage\n\nIf this is not already done, create your first vault :\n\n```\nglacier create \u003cvault-name\u003e\n```\n\nYou can retrieve your vault list :\n\n```\nglacier list\n```\n\nNow, run a backup :\n\n```\ndocker run --rm -i \\\n  --env-file ~/.config/mysql-glacier/.aws \\\n  -e \"GLACIER_VAULT_NAME=myvault\" \\\n  -e \"DBHOST=mysqldb\" \\\n  -e \"DBPORT=3306\" \\\n  -e \"DBNAME=forum\" \\\n  -e \"DBUSER=forum\" \\\n  -e \"DBPASS=xxxxx\" \\\n  -e \"DBSITE=myAwesomeWebsite\" \\\n  -v ~/.cache/glacier-cli:/root/.cache/glacier-cli \\\n  --link mysqldb:mysqldb \\\n  hardware/mysql-glacier\n\n\u003e Generating backup for mysqldb:3306/myAwesomeWebsite-\u003eforum\n\u003e Vault synchronisation\n\u003e Sending backup to your vault 'myvault'\n\u003e Clean local backup\n\u003e Done !\n```\n\nList all your backups :\n\n```\nglacier backup-list \u003cvault-name\u003e\n\nmyAwesomeWebsite-forum-2016-01-30_23-47.sql\nmyAwesomeWebsite-mail-2016-01-30_22-23.sql\nmyAwesomeWebsite-chat-2016-01-30_21-58.sql\n```\n\nRemove a backup :\n\n```\nglacier backup-delete \u003cvault-name\u003e \u003cbackup-name\u003e\nglacier backup-delete \u003cvault-name\u003e \u003cid:xxxxxxxxx\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardware%2Fmysql-glacier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardware%2Fmysql-glacier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardware%2Fmysql-glacier/lists"}