{"id":3406,"date":"2010-10-27T00:00:00","date_gmt":"2010-10-26T22:00:00","guid":{"rendered":"http:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/"},"modified":"2010-10-27T00:00:00","modified_gmt":"2010-10-26T22:00:00","slug":"how-to-backup-redmine-on-google-storage","status":"publish","type":"post","link":"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/","title":{"rendered":"How to backup Redmine on Google Storage"},"content":{"rendered":"

If you would like to backup your Redmine database and files, you might to consider Google Storage as your backup location. It comes with a 100 GB free monthly usage.<\/p>\n

First, you need to sign up<\/a> for a Google Storage account if you don’t have an account already.<\/p>\n

Once done, download and install GSUtil<\/a> which is a command line tool, allowing you to manage buckets.<\/p>\n

Paste the following script into a file called “backup_redmine.sh”<\/p>\n

# required settings \nDB_USERNAME=''\nDB_PASSWORD=''\nDB_NAME=''\nREDMINE_ROOT='' # e.g. \/home\/peter\/rails\/redmine.commanigy.com'\nBACKUP_ROOT='' # e.g. \/home\/peter\/backups (will be created)\n\n# optional settings\nGS_ROOT='gs:\/\/redmine-backup'\nGS_FILENAME='backup_'`date +%Y%m%d`'.tar.gz'\n\necho 'Setting up directories'\nmkdir $BACKUP_ROOT\/redmine\/db -p\nmkdir $BACKUP_ROOT\/redmine\/files -p\n\necho 'Backing up database'\n\/usr\/bin\/mysqldump -u $DB_USERNAME --password=$DB_PASSWORD $DB_NAME | gzip > $BACKUP_ROOT\/redmine\/db\/`date +%Y%m%d`.gz\n\necho 'Backing up attachments'\nrsync -a $REDMINE_ROOT\/files\/ $BACKUP_ROOT\/redmine\/files\/\n\necho 'Packing into single archive'\ntar -czPf $GS_FILENAME $BACKUP_ROOT\/redmine\/\n\necho 'Creating bucket on Google Storage (if not already created)'\ngsutil mb $GS_ROOT\n\necho 'Copying backup archive to Google Storage'\ngsutil cp $GS_FILENAME $GS_ROOT\n\necho 'Cleanup by removing archive'\nrm $GS_FILENAME\n\necho 'Backup complete'\n<\/code><\/pre>\n
\n

You might want to apply execute rights to your script using<\/p>\n

chmod +x backup_redmine.sh\n<\/code><\/pre>\n

And maybe even add it to your crontab to get daily backups<\/p>\n

crontab -e\n<\/code><\/pre>\n

Then add this line<\/p>\n

@daily FULL_PATH_TO_SCRIPT > \/dev\/null\n<\/code><\/pre>\n

That’s it.<\/p>\n

Let me know if you improve this script.<\/p>\n","protected":false},"excerpt":{"rendered":"

If you would like to backup your Redmine database and files, you might to consider Google Storage as your backup location. It comes with a 100 GB free monthly usage. First, you need to sign up for a Google Storage account if you don’t have an account already. Once done, download and install GSUtil which … Continue reading How to backup Redmine on Google Storage<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"yoast_head":"\nHow to backup Redmine on Google Storage • Peter Theill Site<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to backup Redmine on Google Storage • Peter Theill Site\" \/>\n<meta property=\"og:description\" content=\"If you would like to backup your Redmine database and files, you might to consider Google Storage as your backup location. It comes with a 100 GB free monthly usage. First, you need to sign up for a Google Storage account if you don’t have an account already. Once done, download and install GSUtil which … Continue reading How to backup Redmine on Google Storage\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/\" \/>\n<meta property=\"og:site_name\" content=\"Peter Theill Site\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-26T22:00:00+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@theill\" \/>\n<meta name=\"twitter:site\" content=\"@theill\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.theill.com\/#website\",\"url\":\"https:\/\/www.theill.com\/\",\"name\":\"Peter Theill Site\",\"description\":\"What\\u2019s going on in the personal life of Peter Theill\",\"publisher\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.theill.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/#webpage\",\"url\":\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/\",\"name\":\"How to backup Redmine on Google Storage • Peter Theill Site\",\"isPartOf\":{\"@id\":\"https:\/\/www.theill.com\/#website\"},\"datePublished\":\"2010-10-26T22:00:00+00:00\",\"dateModified\":\"2010-10-26T22:00:00+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"headline\":\"How to backup Redmine on Google Storage\",\"datePublished\":\"2010-10-26T22:00:00+00:00\",\"dateModified\":\"2010-10-26T22:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.theill.com\/blog\/2010\/10\/27\/how-to-backup-redmine-on-google-storage\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\",\"name\":\"Peter\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.theill.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f4f96a08152550e603ee595403f3ba57?s=96&d=retro&r=g\",\"caption\":\"Peter\"},\"logo\":{\"@id\":\"https:\/\/www.theill.com\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_shortlink":"https:\/\/wp.me\/p8TYI1-SW","jetpack-related-posts":[{"id":3410,"url":"https:\/\/www.theill.com\/blog\/2010\/08\/18\/upgraded-shoutsms-from-rails-2-3-8-to-rails-3-in-five-minutes\/","url_meta":{"origin":3406,"position":0},"title":"Upgraded ShoutSMS from Rails 2.3.8 to Rails 3 in five minutes","date":"August 18, 2010","format":false,"excerpt":"Today I wanted to try how easy it would be to upgrade our existing ShoutSMS (pretty small) rails application from 2.3.8 to latest Rails 3 release candidate (currently rc3). Without taking our test suite into consideration it took around five minutes with help from the official rails_upgrade[1] plugin. This is\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3398,"url":"https:\/\/www.theill.com\/blog\/2012\/04\/24\/how-to-slice-a-psd-for-use-with-iphone-ipad\/","url_meta":{"origin":3406,"position":1},"title":"How to slice a PSD for use with iPhone & iPad","date":"April 24, 2012","format":false,"excerpt":"If you are designer doing iOS interfaces and want to help your developer, these guidelines are for you. Slice both a regular and retina version. Retina files are postfixed with \u201c@2x.png\u201d (for \u201ctwo times\u201d) e.g. \u201caccount.png\u201d vs \u201caccount@2x.png\u201d Retina files must be placed in same folder as its non-retina brother\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3407,"url":"https:\/\/www.theill.com\/blog\/2010\/09\/02\/using-vi-for-your-simple-day-to-day-editing-needs\/","url_meta":{"origin":3406,"position":2},"title":"Using vi for your simple, day-to-day editing needs","date":"September 2, 2010","format":false,"excerpt":"My favorite editor isn\u2019t vi, but I\u2019m still using it at least a couple of times each day. It\u2019s a short two character command, it\u2019s always available and it starts fast. I have used it for decades and still, I only know these commands. I really don\u2019t need to learn\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3402,"url":"https:\/\/www.theill.com\/blog\/2011\/04\/25\/use-sensible-defaults-when-building-a-web-mobile-or-desktop-application\/","url_meta":{"origin":3406,"position":3},"title":"Use sensible defaults when building a web, mobile or desktop application","date":"April 25, 2011","format":false,"excerpt":"While working on migrating \u201cgomore.dk\u201d, a Danish ridesharing service, to Rails 3, I figured it would make sense to look into the existing database to figure out if I could add some sensible defaults when creating e.g. new rides. The site already contains a decent database so I figured it\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13,"url":"https:\/\/www.theill.com\/blog\/2015\/03\/06\/yikes-heroku-sunsets-bamboo\/","url_meta":{"origin":3406,"position":4},"title":"Yikes. Heroku sunsets Bamboo","date":"March 6, 2015","format":false,"excerpt":"Just received an email from Heroku about sunsetting their old Bamboo stack. Looks like I\u2019ll have a lot of work porting these. I\u2019ve started to download all source code and this is the list :) heroku git:clone --ssh-git -a tour2010 heroku git:clone --ssh-git -a observerq heroku git:clone --ssh-git -a commanigy-redmine\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3396,"url":"https:\/\/www.theill.com\/blog\/2013\/07\/07\/tweak-appcode-font-aliasing-on-your-mac\/","url_meta":{"origin":3406,"position":5},"title":"Tweak AppCode font aliasing on your mac","date":"July 7, 2013","format":false,"excerpt":"If you can\u2019t use your beloved Monaco font in AppCode because it has gained weight and simply looks too bold, you might want to trim your anti-aliasing settings. Try running this in your terminal $ defaults write com.jetbrains.AppCode.plist AppleFontSmoothing -int 1 Left one is updated and right one is original\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"amp_validity":null,"_links":{"self":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts\/3406"}],"collection":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/comments?post=3406"}],"version-history":[{"count":0,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts\/3406\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/media?parent=3406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/categories?post=3406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/tags?post=3406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}