{"id":17664446,"url":"https://github.com/tilfin/serverbackup","last_synced_at":"2025-03-30T12:16:51.644Z","repository":{"id":29483274,"uuid":"33020428","full_name":"tilfin/serverbackup","owner":"tilfin","description":"Server backup to cloud","archived":false,"fork":false,"pushed_at":"2016-02-12T13:58:27.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T14:12:27.029Z","etag":null,"topics":["backup","crontab","gsutil","server-backup"],"latest_commit_sha":null,"homepage":null,"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/tilfin.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":"2015-03-28T04:03:43.000Z","updated_at":"2017-03-17T14:05:43.000Z","dependencies_parsed_at":"2022-09-06T16:40:39.883Z","dependency_job_id":null,"html_url":"https://github.com/tilfin/serverbackup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fserverbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fserverbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fserverbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fserverbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilfin","download_url":"https://codeload.github.com/tilfin/serverbackup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314150,"owners_count":20757463,"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":["backup","crontab","gsutil","server-backup"],"created_at":"2024-10-23T20:05:27.567Z","updated_at":"2025-03-30T12:16:51.623Z","avatar_url":"https://github.com/tilfin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"ServerBackup\n============\n\n[![Build Status](https://travis-ci.org/tilfin/serverbackup.svg)](https://travis-ci.org/tilfin/serverbackup)\n\nServer backup to cloud\n\nIt can rotate the bucket which is backup destination of each day.\n\n\nPrerequisites\n-------------\n\nAny sync tool\n\nFor example,\n\n* s3sync (easy to use https://github.com/tilfin/s3sync forked from aproxacs/s3sync)\n* gsutil (https://cloud.google.com/storage/docs/gsutil)\n\n\nSetup\n-----\n\n```\n$ sudo -i\n# mkdir -p /backup/log\n# mkdir /backup/tmp\n# cd /backup\n# git clone --depth 1  https://github.com/tilfin/serverbackup.git\n# cd serverbackup\n# cp backup.conf.sample backup.conf\n```\n\n### Quick Settings for Google Cloud Storage\n\n#### Install gsutil\n\n```\n# apt-get install python-dev python-crypto\n# cd /backup\n# wget https://storage.googleapis.com/pub/gsutil.tar.gz\n# tar zxf gsutil.tar.gz\n```\n\n#### Setup gsutil authentication\n\n```\n# /backup/gsutil/gsutil config -o /backup/serverbackup/boto.cfg\n```\n\nThe above method is that the token refresh does not work.\nIt is permanently set up in the following way.\n\n1. Create a service account at your Google cloud console.\n2. Select to furnish a new private key whose type is _P12_.\n3. Put created .p12 file at `/backup/serverbackup/\u003csecret key file.p12\u003e`\n4. Write `/backup/serverbackup/boto.cfg` with the content of the following\n\n```\n[Credentials]\ngs_service_client_id = \u003cservice account email address\u003e\ngs_service_key_file = /backup/serverbackup/\u003csecret key file.p12\u003e\ngs_service_key_file_password = \u003cpass phrase for key file\u003e\n\n[Boto]\nhttps_validate_certificates = True\n\n[GSUtil]\ncontent_language = en\ndefault_api_version = 2\ndefault_project_id = \u003cGoogle Developer Project ID\u003e\n```\n\n#### backup.conf\n\nEdit following entries.\n\n* Buckets\n* Sync\n\n```\nBuckets=backup-bucket\nSync=/backup/serverbackup/sync.gsutil\n```\n\n#### Backup commands\n\nbkcmd.d behaves like _rcX.d_. Kick each script with prefix 'S' in this directory.\n${BKUP_PREFIX} is combined backup directory path and file prefix which is the day number (ex _/backup/tmp/3-_).\n\n\n#### Crontab\n\nKick backup at 3:00am\n\n```\n0 3 *   *   *     /backup/serverbackup/backup\n```\n\nYou can mail a backup result if you set MAILTO in crontab.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Fserverbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilfin%2Fserverbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Fserverbackup/lists"}