Table of Contents
- IBM Bluemix Cloud Object Storage (S3) Tools and Guides
IBM Bluemix Cloud Object Storage (S3) Tools and Guides
This repository contains guides for using Open Source tools to backup Linux and Windows Servers to the IBM Bluemix Cloud Object Storage (S3) service. The IBM Bluemix Cloud Object Storage (S3) service, sometimes shortened to COS (S3), allows you to store and access your data with our resilient service. With S3 API support, cross-region resiliency, and built-in security using SecureSlice technology, Cloud Object Storage (S3) Standard allows you to create and manage buckets and provides credentials and endpoints for use with tools, applications, and gateways.
Windows GUI Backup using Duplicati
Windows Command Line Backup using Duplicati
The Linux guide combines rsnapshot to backup both local and remote hosts, and s3cmd to push the backups to COS (S3). There is also a KnowledgeLayer guide on how to use
s3cmd to interact with your buckets.
Automated Backups in Linux
backup_script.sh is used to automate the process of installing and configuring
rsnapshot for local "hot" backups and off-site "cold" backups. The script also sets up a cron job to compress the current
rsnapshot backup directory every night at 10pm and push to a bucket in Cloud Object Storage (S3).
The script is broken down in to functions that I will explain here:
- check_your_privilege: This function will check if you are root or not. If you are not root the script will assign sudo to the commands
- set_install_variables: Determines the underlying OS so that it can set install variables
- install_tools: Installs s3cmd, rsnapshot, rsync, and wget
- configure_rsnapshot: Downloads our example rsnapshot.conf file and prompts you to set the directory where rsnapshot stores backups. Also downloads the rsnapshot cron file for automated backups.
- configure_s3cmd: Downloads example s3cmd configuration file and prompts the user for their COS (S3) Access and Secret Keys as well as the COS (S3) endpoint to use. This function also creates a randomly named bucket to test that s3cmd is configured properly.
- cos_backup_schedule: Downloads a script that will compress your rsnapshot backup directory and send it to COS (S3) using s3cmd. Function also sets up a daily cron to run that script at 10pm evey night.
- post_install: Prints information about the install
The Script has been tested on the following operating systems: