Changes between Version 1 and Version 2 of GettingDataFromUSB

Feb 21, 2008, 5:39:53 AM (11 years ago)
Timothy Wilson



  • GettingDataFromUSB

    v1 v2  
    1 Getting data off a USB disk, and into the backup store.
     2== Getting data off a USB disk, and into the backup store. ==
    35If you're using boxbackup to backup through the internet, chances are you'll have some machines that have large amounts of data to be backed up, but sending it through the internet will take some time, and, depending where you live, could also be expensive. Wouldn't it be nice if you could copy all that data onto a USB disk and sync locally for the initial backup? The good news is that you can!
    911CONF_CLI is where the client config is
    1012CA_BASE is the base directory of the Certificate Authority
    11 Install the Client on the Server machine.
     16'''Install the Client on the Server machine.'''
    1217Step one is to install make sure that the backup client is on the server too. I have been using the 0.11RC2 tarball, but your distribution may provide a different version. Whatever the case, make sure you use the same version as your server! You will need the development tools for your distro to compile from source.
    14 Using Ubuntu:
     19''Using Ubuntu:''
    1520sudo apt-get install build-essential
    16 Using ClarkConnect:
     21''Using ClarkConnect:''
    1722apt-get install cc-devel
    2530make backup-client-install
    26 Configure the Server to backup from the local directory
     32'''Configure the Server to backup from the local directory'''
    2733You need to create the backup account on the machine first. If you have already made an account on the client machine, just copy the configs and certificates to the server. Make sure you set the permissions appropriately!  Also, think about the soft and hard limits. Don't set them too low.
    2836bbstoreaccounts -c ${CONF_SRV}/bbstored.conf create 123456 0 10G 15G
    2939Mount your USB drive somewhere. I'm assuming you've just used rsync or some such tool to copy directly onto the disk. Your disk should look like this:
    3042[email protected]:/mnt/# ls client123456/
     43/home /etc /var
    32 /home /etc /var
    3346Once you've mounted the disk, we can generate the client config. I'm assuming disk is mounted on /mnt
    3449mkdir -p ${CONF_CLI} ${DATA_CLI}
    3550chmod og= ${CONF_CLI} ${DATA_CLI}
    3651bbackupd-config ${CONF_CLI} snapshot 123456 ${HOSTNAME_SRV} ${DATA_CLI} /mnt/client123456/home/ /mnt/client123456/var
    3754This will backup /home and /var from the USB disk. Then sign your certificates as usual.
    3857cp ${CONF_CLI}/bbackupd/123456-csr.pem ${CA_BASE}
    3958cd ${CA_BASE}
    4261cp ${CA_BASE}/ca/clients/123456-cert.pem ${CONF_CLI}/bbackupd
    4362cp ${CA_BASE}/ca/roots/serverCA.pem ${CONF_CLI}/bbackupd
    44 Run the backup
     65Run the backup'''
    4566Now you can run bbackupd. Please make a backup of your 123456-FileEncKeys.raw. You need this to restore files! I tar all mine up and keep a copy on several systems. I'm not sure what other people do, but it's crucial to keep these in a safe place.
    4667Once the backup has run, you need to stop bbackupd on the server, umount the USB hdd, and configure the client.
    4869Tar up all the configs, then scp them to the remote machine. Create the relevant directories on the server, then untar the config. Then edit the config with your favourite editor:
    6388So you remove all the /mnt/client123456. Then the machine will backup as normal! Just remember to use cron to run bbackupctl if you're using snapshot mode, and you're done.