| 1 | == How do I setup a backup account on May First/People Link? == |
| 2 | |
| 3 | If you are running a linux backup system and you'd like an offsite server to back your data up to, you can use the May First/People Link shared backup server. If you are using an OS X server, you will not be able to use these directions. You will be able to do backups using rsync (with: [http://www.quesera.com/reynhout/misc/rsync+hfsmode/ rsync+hfsmode]), however, rdiff-backup uses the rsync libraries, it does not call rsync directly. So getting the proper HFS file system support will require using rsync+hfsmode directly). If you are using Windows, we'd strongly encourage you to setup a linux file server prior to trying any type of automated backup system. |
| 4 | |
| 5 | Having said that...You are free to use whatever backup software you like, provided that it can copy files via ssh using an ssh public/private key pair. |
| 6 | |
| 7 | We recommend that you use backupninja and rdiff-backup. Below are instructions for how to get started with these two programs. |
| 8 | |
| 9 | NOTE: in it's current release backupninja has no easy way to limit bandwidth (bandwidth limiting will be available in future releases). That means that when you run the backup it will probably take over your Internet connection :(. That's not a problem if you schedule your backup for the middle of the night and it only runs for 15 minutes or so (only copying the files that have changed). However, it can be a problem during the initial upload. Please contact support so we can agree on the best method for the initial copy. |
| 10 | |
| 11 | If you are not running Debian, please check out the respective web sites for backupninja and rdiff-backup to download the programs ([http://dev.riseup.net/backupninja/ http://dev.riseup.net/backupninja] and [http://www.nongnu.org/rdiff-backup/ http://www.nongnu.org/rdiff-backup]). |
| 12 | |
| 13 | The directions below assume that you are running Debian linux. |
| 14 | |
| 15 | * Create an ssh key pair as the root user on your server (if you haven't already): |
| 16 | |
| 17 | {{{ |
| 18 | ssh-keygen -t rsa |
| 19 | }}} |
| 20 | |
| 21 | |
| 22 | * Email the public key to support@mayfirst.org. The public key should be stored in /root/.ssh/id_rsa.pub |
| 23 | |
| 24 | * Test the public key (after you've received confirmation that it has been installed) by trying to ssh into our backup server while you are root: |
| 25 | |
| 26 | {{{ |
| 27 | ssh MEMBERNAME-sync@c.backup.mayfirst.org |
| 28 | }}} |
| 29 | |
| 30 | * Install backupninja and rdiff-backup |
| 31 | |
| 32 | NOTE: You'll need to install the same version of rdiff-backup that we have on our server. Our version runs the version of rdiff-backup in Debian Etch. If you are running Sarge, you'll want to install rdiff-backup from backports.org. As of April 10, 2007 we are using rdiff-backup version 1.1.5. |
| 33 | |
| 34 | {{{ |
| 35 | apt-get install backupninja rdiff-backup |
| 36 | }}} |
| 37 | |
| 38 | * Create a file in /etc/backup.d called 90-mfpl.rdiff with contents along the lines of: |
| 39 | |
| 40 | {{{ |
| 41 | #options = --force |
| 42 | |
| 43 | ###################################################### |
| 44 | ## source section |
| 45 | ## (where the files to be backed up are coming from) |
| 46 | |
| 47 | [source] |
| 48 | |
| 49 | |
| 50 | # an optional subdirectory below 'directory' (see [dest]) |
| 51 | label = SERVERNAME |
| 52 | |
| 53 | # only local type is currently supported |
| 54 | type = local |
| 55 | |
| 56 | # how many days of data to keep |
| 57 | keep = 5 |
| 58 | |
| 59 | # files to include in the backup |
| 60 | # (supports globbing with '*') |
| 61 | include = /etc |
| 62 | include = /var/log |
| 63 | include = /var/www |
| 64 | include = /home |
| 65 | |
| 66 | # files to exclude from the backup |
| 67 | # (supports globbing with '*') |
| 68 | exclude = /etc/dnscache/* |
| 69 | |
| 70 | ###################################################### |
| 71 | ## destination section |
| 72 | ## (where the files are copied to) |
| 73 | |
| 74 | [dest] |
| 75 | |
| 76 | # only remote type is currently supported |
| 77 | type = remote |
| 78 | |
| 79 | # the machine which will receive the backups |
| 80 | host = c.backup.mayfirst.org |
| 81 | |
| 82 | # put the backups under this directory |
| 83 | directory = /home/members/MEMBERNAME/backups/ |
| 84 | |
| 85 | # make the files owned by this user |
| 86 | # note: you must be able to ssh backupuser@backhost |
| 87 | # without specifying a password |
| 88 | user = MEMBERNAME-sync |
| 89 | }}} |
| 90 | |
| 91 | * Edit /etc/backupninja.conf |
| 92 | |
| 93 | Ask May First/People link what time you should schedule your backup and edit the when line appropriately. |
| 94 | |
| 95 | * Test with: |
| 96 | |
| 97 | {{{ |
| 98 | backupninja -t -n -d |
| 99 | }}} |
| 100 | |
| 101 | (t is test, n is now, d is debug) |