Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I have to Linux computers contected to the same network and I would like to have backup of the first machine on the second machine and wise versa, eg. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie rat007's Avatar
    Join Date
    Jul 2004
    Location
    Brno
    Posts
    230

    How to backup two computers


    Hi, I have to Linux computers contected to the same network and I would like to have backup of the first machine on the second machine and wise versa, eg. from the second machine on the first one. Is there some tool I can use or does somebody already tried sth like this?

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Location
    London, UK
    Posts
    53
    Hi rat007,

    There are probably 1000 ways to do this and I'm not sure what is the best for you. If you just want to syncronize the file structures to a backup tree on the other machine you may want to have a look at the rsync utilitity.
    Other methods could invlove copying tar-files between the machines or if you want more fancy options you could use dump or cpio.

    Simple shell script to do this (requires that you have created ssh keys for the "backup user (root?)"):

    Code:
    #!/bin/bash
    TARGETSERVER="machine2"
    TARGETDIR="/backup"
    BACKUPDIRS="home opt"
    
    for DIR in BACKUPDIRS; do
     echo "Doing backup of /${DIR} to ${TARGETSERVER} please wait..."
     tar czf - /${DIR} | ssh $TARGETSERVER dd of=${TARGETDIR}/${HOSTNAME}-${DIR}.tar.gz
    done
    This script would backup the directories /home and /opt and store them as tar.gz files on the server machine2.

    On the second machine just use the same script but replace machine2 with the name of the first machine. Don't forget to make sure $TARGETDIR and such things exist and have sufficent space for the full backups. If you need serveral version of your backups you could add something like this to name the target backup file with todays weekday (i.e. Mon, Thu).
    Code:
    FILETAG=`date +%a`
    ...
     tar czf - /${DIR} | ssh $TARGETSERVER dd of=${TARGETDIR}/${HOSTNAME}-${DIR}-${FILETAG}.tar.gz
    If you need a "real" backup solution with proper versions and incremental backups or data-agent for things such as Oracle or SAP you could have a look at Veritas NetBackup or Tivoli Storage Manager. If you wish to test Vertias Netbackup out just give Veritas a call and ask for a evaluation license that works for 30 (or is it 90-days? I can't remember), they are usually very helpfull with things like this.

    Test this out and ask again if I can be of any more assistance.

  3. #3
    Linux Newbie rat007's Avatar
    Join Date
    Jul 2004
    Location
    Brno
    Posts
    230
    I just realized that the problem is bit more specific. There's a samba server running on RH9.1 and the company wants another server which will backup the first one and also substitude the first one in a case of failure. I think it's not need while their having RAID but what if RAID controler will fail and I will sell another server to them so why not

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •