HOWTO.back.up.your.server ========================= - initial draft 2001-07-14 - revised 2001-11-27 - revised 2002-7-11 - change to d2dbackup from flexbackup 2004-07-01 BaseSpace.net can back up your data to a set of disks located 1/4 kilometer from our data center. You can take advantage of this service in two ways: 1. You SCP or FTP your files to your directory on our primary server (halifax), where it will then be backed up on a nightly basis. In this case, you are responsible for setting up whatever periodic file transfer you want. 2. For managed server customers and colocation customers using an operating system that can export file systems over NFS, we can back up your machine using d2dbackup, an open source perl backup management program developed by our staff. More info on d2dbackup in general is available at: http://d2dbackup.nber.org How backups are billed ---------------------- Backup service is billed the same way whether you push your files to our backup server, or we pull them from you over NFS. For colocation customers, there is a basic fixed monthly charge of $20 for the backup service (backup service is included for free in the managed server package). In addition, network bandwidth used in backing up your system remotely will be measured as if it were internet bandwidth usage and billed in the same way (see our Bandwidth Billing and Metering Policy). The reason for this is that with our current instrumentation we cannot distinguish between internet bandwidth usage and bandwidth usage internally within the BaseSpace.net network. All outgoing traffic from a customer's machine passing through a BaseSpace.net switch is metered. Even though the traffic generated by backups does not use expensive internet bandwidth, we charge for it at the same rate to cover the costs of usage, disks, staff time, etc. In practice, bandwidth used for backup is usually small compared to internet bandwidth. The key to reducing your costs is to be selective about what you choose to back up. Therefore, if you use d2dbackup, we provide a way for you to control what files on your server are backed up using this method, described in the section below entitled "Selecting what to back up under d2dbackup". Setting up backups with d2dbackup --------------------------------- If you are a managed server customer, you can ignore this section: we will set up everything that is necessary on your machine. If you are a colocation customer, you must arrange to NFS-export the file systems you want backed up to the backup server, backup.basespace.net. On most flavors of unix, you will need to some or all of the following: 1. Edit the file that controls what volumes are exported: On Linux and BSD this file is /etc/exports, on Solaris it is /etc/dfs/dfstab. Create an export entry for each file system you want backed up. The file system should be exported read-only. IMPORTANT: the file system must be exported with the no_root_squash option. Example /etc/exports line under Linux: /home backup.basespace.net(ro,sync,no_root_squash) For more information see your unix manual pages for /etc/exports or exportfs. 2. Make the changes to the exports file take effect: - On Linux the command is "exportfs -a" 3. Enable the NFS server if it is not already enabled: - On Linux, use "chkconfig nfs on" - On Solaris this is not required as the NFS server starts automatically if there are any exports. 4. Start the NFS server: - On Linux, "/etc/init.d/nfs start" - On Solaris, "/etc/init.d/nfs.server start" Selecting what to back up under d2dbackup: the d2dbackuptab file ---------------------------------------------------------------- Backups of your systems are controlled by your backuptab file. This file is located on the backup server (not your own machine) at /home//backup/d2dbackuptab This file consists of a series of FILESYSTEM declarations. The format of a FILESYSTEM delcaration is: FILESYSTEM : You can see several examples of this in the backuptab for basespace itself, /home/basespace/backup/backuptab Note that you must have a separate FILESYSTEM declaration for each separate file system on each of your servers. Below each FILESYSTEM declaration you can specify more finely what files and directories are included and excluded in the backups. Four configuration directives are supported: include exclude dirinclude direxclude These directives take a single argument, which is a perl regular expression pattern. If the full path to a file (for include/exclude) or directory (for dirinclude/direxclude) matches the pattern, that file or directory will be included or excluded. Processing of the list ends when the first match is found. The configuration statements are evaluated in order; however directories are processed before their contents, so effectively all dir* are applied first. By default all files are included. Examples: - Exclude all files and directories whose names begin with a ".": exclude /\. - Exclude all files ending in .html: exclude \.html$ - Do not descend into the /usr/lib directory: direxclude /usr/lib Warning: directories are processed top-down. This means that a superdirectory has to pass the include test before its subdirectories. So for example dirinclude /usr/local direxclude /usr will not work as intended, because once /usr is excluded, its subdirectories will never be processed at all. In summary, it is usually best to use "include/exclude" rather that "dirinclude/direxclude". In addition to any include and exclude directives that you specify, d2dbackup is configured by default with some basic includes and excludes. For instance, .bak and ~ editor-created files and /tmp directories are skipped. This provides only an overview of the operation of d2dbackup and the d2dbackuptab configuration directives. We are happy to work with you to set up backups and create a configuration that minimizes backing up unnecessary data while ensuring that your critical data is covered.