# disaster recovery Gentoo

## neo_phani

How are ppl backing up Gentoo Servers ? 

Veritas Netbackup has a Linux plugin and here is the description of it.I dont see Gentoo on there but i dont understand what is specific to those linuces when talking about a backup software. Can we back up Gentoo with this ?

Also i would like to know what other people are using and their recommendations ? Dont refer to Amanda we dont have 

tape drive servers. we are a small shop with hetrogenous OSes inside.but would like to restore Getnoo servers in case of a failure.

Thanks

Veritas Netbackup Exec marketing pitch

Provides high performance network-wide data protection for 32 and 64-bit remote Linux and UNIX servers. The redesigned agent extends Backup Exec softwares advanced agent technology beyond Windows and Netware to meet the need of the emerging business applications on Linux operating systems. This agent provides full or incremental, or differential backup and restore of the following versions: 

 Red Hat Advanced Server 2.1

 Red Hat Enterprise Linux AS, ES, WS 3.0

 SuSE Linux Enterprise Server 8.2, 9.0

 Solaris (SPARC) 8,9

 VMware GSX 3.1

 Red Flag Linux Data Center 4.1

 Red Flag Linux Advanced Server 4.1

 Miracle Linux 3.1

----------

## moocha

For backing up data, I use app-admin/amanda.

For backing up the actual system (i.e. everything except user data), I use trusty ole tar:

```
tar jcpvlf /mnt/rbs/appsrv-$(date +%Y%M%d).tar.bz2 --exclude-from /usr/local/state/sysb-exclusion /
```

That requires a well-chosen partitioning scheme before installing, of course, so you can keep data, temp files, cached files, etc off the root file system.

----------

## drkstorm

i'm curious to know how i can fully backup my linux server using free/easily emerged tools. I use rsnapshot for user file backup, but i'd really like to prepare for a situation where i have a liveCD, backup tapes, and a new server... and I can restore my server to working status with just those tools... I don't have a special partitioning scheme, I'd like to learn how yours is setup, but more importantly, what can I do now with my standard /boot swap and / partitions?

----------

## Bad Penguin

 *neo_phani wrote:*   

> How are ppl backing up Gentoo Servers ? 
> 
> Veritas Netbackup has a Linux plugin and here is the description of it.I dont see Gentoo on there but i dont understand what is specific to those linuces when talking about a backup software. Can we back up Gentoo with this ?
> 
> 

 

I use the veritas backup exec agent, although on one machine in particular I get weird problems with it.  My box starts showing errors doing anything network related, I do a netstat -ant, I see 10's of thousands of connections stuck in TIME_WAIT to port 6101 on the backup exec server:

```

tcp        0      0 192.168.2.221:21944   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21945   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21946   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21947   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21948   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21949   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21950   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21951   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21936   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21937   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21938   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21939   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21940   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21941   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21942   192.168.10.88:6101     TIME_WAIT

tcp        0      0 192.168.2.221:21943   192.168.10.88:6101     TIME_WAIT

```

This only happens on one workstation, I have never seen it on the other servers running it.  The only difference I can see is the workstation is running hyperthreading, the servers are all pentium3, some smp some not.  Go figure.

Here is my ebuild if you are interested.  Name it bexec-client-269803.ebuild.

```

#

#

# $Header: $

MY_P="be_agnt_${PV}"

DESCRIPTION="Veritas Backup Exec Agent for Linux"

HOMEPAGE="http://www.veritas.com/"

SRC_URI="http://ftp.support.veritas.com/pub/support/products/\

Backup_Exec_for_WindowsNT/${MY_P}.tar"

RESTRICT="fetch nostrip mirror"

LICENSE="as-is"

SLOT="0"

KEYWORDS="x86"

IUSE=""

DEPEND=""

RDEPEND=""

S=${WORKDIR}

src_install() {

   cd ${S}/common || die "Could not cd to source directory"

   into /usr

   newsbin agent.linux24 agent.be || die "Could not install agent.linux24"

   cd ${S}/english || die "Could not cd to source directory"

   insinto /etc/veritas

   newins agent.cfg agent.cfg.dist || die "Could not copy agent.cfg"

   cat ${S}/common/linux24.excl >>${D}/etc/veritas/agent.cfg.dist ||\

   die "Could not add exclusion list"

   exeinto /etc/init.d

   newexe ${FILESDIR}/bexec.init bexec

}

pkg_nofetch() {

   einfo "Please download the Veritas Backup Exec Agent from"

   einfo "${SRC_URI}"

   einfo "and put the file in ${DISTDIR}"

   einfo

}

pkg_postinst() {

   if ! `grep "^grfs" /etc/services | grep "6101/tcp" >/dev/null 2>&1`; then

      einfo "Adding grfs to /etc/services"

      echo -e "grfs\t6101/tcp\t#grfs for backup exec client" \

      >>/etc/services

   fi

   einfo ""

   einfo "The Veritas Backup Exec Agent must be configured before running."

   einfo ""

   einfo "Copy /etc/veritas/agent.cfg.dist to /etc/veritas/agent.cfg and modify"

   einfo "to your installation."

   einfo ""

   einfo "Make sure and add the backup server (specified by tell= in agent.cfg) "

   einfo "to /etc/hosts."

   einfo ""

   einfo "Run rc-update add default bexec to automatically start the agent at boot."

   einfo ""

}

pkg_postrm() {

   einfo ""

   einfo "The grfs service must be manually removed from /etc/services."

   einfo ""

}

```

----------

## ramereth

Where's the init script you have referenced in your filesdir?

----------

## karnesky

 *neo_phani wrote:*   

> Dont refer to Amanda we dont have tape drive servers.

 AMANDA isn't only for tape servers, but a tape server is certainly a good investment.  It is what I use & is BY FAR my favorite backup app of all time.

----------

## NightTwix

you might try this one: https://forums.gentoo.org/viewtopic-t-312817.html

Its a Stage4-backup and work quite nice

----------

## TrainedChimp

 *drkstorm wrote:*   

> i'm curious to know how i can fully backup my linux server using free/easily emerged tools. I use rsnapshot for user file backup, but i'd really like to prepare for a situation where i have a liveCD, backup tapes, and a new server... and I can restore my server to working status with just those tools... I don't have a special partitioning scheme, I'd like to learn how yours is setup, but more importantly, what can I do now with my standard /boot swap and / partitions?

 

I emerged flexbackup, works well for me; I've tested it and also used it to migrate to new hardware. I don't use it with a tape, I use it with an extra hard drive.

----------

## Rad

I started to prefer very simple scripts over time; they adapt best, are very reliable and you can do about anything backup related with them. It's pretty easy to choose the fastest method to backup over your network, or, for example, use the EVMS CLI to get an online backup of your filesystem's state in exactly one point in time.

Restoring backups created by scripts also is a breeze, as you can do that very differently to how you created them if you need to, hence you won't have to get a particular piece of software (maybe even a certain version of it) running first.

With scripts, it's also a simple task to add md5sum checks to show a backup was transferred cleanly or add redundancy with par2cmdline etc.

A few good ideas can be found in the gentoo wiki:

http://gentoo-wiki.com/HOWTO_Backup

----------

## groovin

using an adaptation of rsync snapshots (as shown in the gentoo-wiki article posted above). i just dont rsync stuff like /dev, /proc, /sys and /mnt. 

also, whenever i compile a new kernel, i save a copy of it and the .config somplace remotely. 

if i needed to do a bare metal restore, i can recreate the partitions exactly how they were and mvoe all the data back into.

ok, its a bit more complex than that, but thats the rough outline.

----------

## jtaylor72

I use partimage

----------

## lunarfu

 *jtaylor72 wrote:*   

> I use partimage

 

I also use partimage. But I use it within System Rescue CD which is a liveCD based off of Gentoo. After perfecting any of my Gentoo setups, I boot up the liveCD, mount the appropriate directories, run partimage, and later burn the backup to CD-R. 

The liveCD also has tons of other tools. Here's a short list: http://www.sysresccd.org/systools.en.php

----------

## DeathAndTaxes

I *have* used rdiff-backup in this scenario.  I had a livecd, a recent stage3 tarball, and then I just used rdiff-backup for a recent copy of my filesystem on top of that.

rdiff-backup is easy to install, but it takes a bit to get the hang of the syntax.  The mailing list is pretty active, so you can find additional help/info there.

----------

