Submitted by mig5 on Sun, 28/03/2010 - 11:02
I've been playing with RackSpace Cloud lately and so far I've been quite impressed. The price is quite competitive, the network seems quite stable and performance is no issue. Plus: persistent storage in the cloud, out of the box! Awesome.
The support has been good (I had a routing issue on privatenet interfaces between two servers, which I was certain was either at the network or hypervisor layer and not my firewall. The engineers and I ran through the usual tests til it was assumed a hypervisor routing issue with this particular guest, which a reboot of the guest fixed).
#!/bin/bash
# Basic backup script
# Written in February 2010
# Set to q to disable verbosity
VERBOSITY="v"
# The program we're using to backup
PROGRAM="rsync"
# The arguments to the program
OPTIONS="-aHP$VERBOSITY"
# The remote machine we're backing up
SERVER="max"
# The local disk to back up to
DISK="/mnt/disk"
# An array of shares on $SERVER to back up
SHARES=(
hr
finance
clients
operations
newsvn
svn
backup/jira
backup/svn/noah
backup/dbbackups/kontrol_live
backup/dbbackups/god
)
# The magic
for share in ${SHARES[*]}; do
VERY simple rsync script. It rsyncs a remote directory across to a local one. There's no special reason why I did this, other than I wanted to run the script on my local machine. It could just as easily rsync a local directory to a remote one.
#!/bin/sh
export RSYNC_RSH=/usr/bin/ssh
origin=remote.machine.com # the remote machine to rsync from
user=miguel # the remote user
rsync -aHPvz "${user}@${origin}:/remote/files/" "/local/files/"
I run ssh-keygen -t rsa and create a password-less key on the remote machine, and copy the .pub file into my authorized_keys. This way I can run this script on a cron, say in the middle of the night, and not have to be around to enter a password at the prompt.
Recent comments