{"id":16850423,"url":"https://github.com/jacques/backup-scripts","last_synced_at":"2025-04-11T06:55:50.003Z","repository":{"id":9173667,"uuid":"10973519","full_name":"jacques/backup-scripts","owner":"jacques","description":"Various backup scripts for Kaizen Garden users to use on Kaizen Gardens Shared Hosting service on SmartOS.  They can also be used for backing up data on TextDrive's legacy Shared Hosting, Joyent SmartMachines (or SDC/SmartOS SmartMachines at Telefonica, ZCloud, etc.)","archived":false,"fork":false,"pushed_at":"2014-06-12T11:39:21.000Z","size":339,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-06T06:57:06.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jacques.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":"2013-06-26T16:50:06.000Z","updated_at":"2025-03-30T00:40:44.000Z","dependencies_parsed_at":"2022-07-19T04:32:47.271Z","dependency_job_id":null,"html_url":"https://github.com/jacques/backup-scripts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacques%2Fbackup-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacques%2Fbackup-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacques%2Fbackup-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacques%2Fbackup-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacques","download_url":"https://codeload.github.com/jacques/backup-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358555,"owners_count":21090402,"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-13T13:22:41.108Z","updated_at":"2025-04-11T06:55:49.980Z","avatar_url":"https://github.com/jacques.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backup Scripts\n\nVarious backup scripts for backing up your Shared Hosting account on Kaizen Gardens\nShared Hosting service.  Can also be used for backing up data on Joyent\nSmartMachines and TextDrive's legacy Shared Hosting service.\n\n## Getting Started\n\nCurrenty expects to be run under SmartOS zones (useful if you're on a Kaizen Gardens\nShared Hosting account on SmartOS or a Joyent SmartMachine).\n\n### SSH Keys\n\nBest to use seperate private/public key-pairs to authenticate to different services.\n\nIn ~/.ssh/config use something like:\n\n```\nHost example.strongspace.com\n  IdentityFile ~/.ssh/id_rsa-strongspace\n```\n\n### MySQL\n\nExpects a ~/.my.cnf file to be configured:\n\n```\n[client]\nuser = username\npassword = password\n```\n\n```\nMYSQL_DAYS_TO_KEEP=14\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eKey\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eExample\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eMYSQL_DAYS_TO_KEEP\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eNumber of days worth of backups to store (it removes files older than X days based on the file modification time)\u003c/td\u003e\n    \u003ctd\u003e14\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### PostgreSQL\n\nExpects a ~/.pgpass file to be configured.\n\n```\nPGSQL_DAYS_TO_KEEP=14\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eKey\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eExample\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePGSQL_DAYS_TO_KEEP\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eNumber of days worth of backups to store (it removes files older than X days based on the file modification time)\u003c/td\u003e\n    \u003ctd\u003e14\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Offsite Backups\n\nPresently supports backing up to a remote SFTP location.\n\n```\n#\n# Backup Host\n#\nBACKUP_OFFSITE_ENABLED=yes\nBACKUP_HOST=sftp.example.com\nBACKUP_USER=username\nBACKUP_REMOTE_DIR=/path/to/backups/\n\nRSYNC_OPTS=--delete-after\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eKey\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eExample\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBACKUP_OFFSITE_ENABLED\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eIs offsite backup syncing enabled\u003c/td\u003e\n    \u003ctd\u003eyes\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBACKUP_HOST\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eHostname or IP Address of the server where files are backed up to\u003c/td\u003e\n    \u003ctd\u003esftp.siberia.co.za\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBACKUP_USER\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eUsername on the server specified in BACKUP_HOST\u003c/td\u003e\n    \u003ctd\u003ejacques\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBACKUP_REMOTE_DIR\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eThe remote diretory where files are uploaded to\u003c/td\u003e\n    \u003ctd\u003e/users/home/jacques/remote-backups/joey/\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRSYNC_OPTS\u003c/td\u003e\n    \u003ctd\u003estring\u003c/td\u003e\n    \u003ctd\u003eSpecifies options to rsync.  To do a \"dry run\" use --dry-run.\u003c/td\u003e\n    \u003ctd\u003e--delete-after\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Generate a SSH public/private key-pair\n\nGenerate a public/private key-pair without a passphrase so that backups can be\nuploaded offsite without prompting to enter a password or a pass phrase to unlock\nthe ssh private key.\n\n```\nssh-keygen -t rsa -b 4096 -N ''\n```\n\nYou may want to store this to generated key-pair to ~/.ssh/id_rsa-strongspace for a\npublic/private key-pair you just use with StrongSpace.\n\n### Configuration files\n\nCopy config.example to config so that the configuration can be sourced by the\nvarious scripts.\n\n## Contributing\n\n1. Fork it.\n2. Create a branch (git checkout -b fix-for-something)\n3. Commit your changes (git commit -am \"[#TICKET] Fixed something\")\n4. Push to the branch (git push origin fix-for-something)\n5. Open a Pull Request\n6. Enjoy a refreshing Dr Pepper and wait for the pull request to be merged\n\n## License\n\n```\nCopyright (c) 2013-2014 Jacques Marneweck. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacques%2Fbackup-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacques%2Fbackup-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacques%2Fbackup-scripts/lists"}