Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-30 Thread A. Khattri
On Thu, 30 Jun 2005, Matthias Bethke wrote:

> Or, if you don't mind some configuring, use amanda. It scales nicely to
> more machines should the need arise.

For most people, Amanda is wy over the top...

-- 

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-30 Thread Matthias Bethke
Hi Raphael,
on Friday, 2005-06-24 at 15:27:02, you wrote:
> I have one machine (Machine 1) that I need backup its files
> periodically. I also have another machine (Machine 2) that will hold
> the backup. Machine 2 can "see" (make requests to) Machine 1, but the
> opposite isn't true. The network is covered by a firewall, so I don
> need a paranoid solution. I was thinking about doing the following:
> 
> On Machine 1, put it on the crontab to put netcat waiting for
> requests, and when it did receive a request, dump the files. Like
> this: [...]

Hm, sounds feasible, although not really secure. Maybe it's not a
concern in a switched network where nobody is supposed to know about ARP
spoofing and stuff, but if you have a few CPU cycles to spare you could
put the backup account's SSH pubkey on machine1, so you can log in w/o
password and then run
  ssh machine1 "tar -jcf - /whereever" >backup.tar.bz2
on the backup machine.
Or, if you don't mind some configuring, use amanda. It scales nicely to
more machines should the need arise.

cheers!
  Matthias

-- 
I prefer encrypted and signed messages.   KeyID: 90CF8389
Fingerprint: 8E 1F 10 81 A4 66 29 46  B9 8A B9 E2 09 9F 3B 91


pgpnic1vaB2lk.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Neil Bothwick
On Wed, 29 Jun 2005 07:34:16 -0400, Bill Roberts wrote:

> I used to use rdiff-backup, I found it very satisfactory. But at one
> point I had a hard drive melt down, tried to do restore, mucked it up,
> ended up doing a full rebuild, pulling in configuration info from the
> backup files. There has to an easier way. 
> 
> Any suggestions on using rdiff-backup for a cold iron restore??

In that case, I'd just copy the entire backup directory back to the hard
drive.

I make squashfs archives of the backups each week and write them to a
bootable DVD. If disaster strikes, I can boot fro the DVD, mount the
backups and copy the files back to the hard drive.


-- 
Neil Bothwick

Kludge: (v., adj., or n.) to fix a program in the usual way.


pgp7MhCEizhqD.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Bill Roberts
I used to use rdiff-backup, I found it very satisfactory. But at one
point I had a hard drive melt down, tried to do restore, mucked it up,
ended up doing a full rebuild, pulling in configuration info from the
backup files. There has to an easier way. 

Any suggestions on using rdiff-backup for a cold iron restore??

Bill Roberts

On 11:14 Wed 29 Jun , Neil Bothwick wrote:
> On Wed, 29 Jun 2005 17:45:52 +0800, Ow Mun Heng wrote:
> 
> > > rdiff-backup --restore-as-of 1D12h /backup/path/to/file
> > > 
> > > will restore file to the version you used 36 hours ago.
> > 
> > Wow.. That does seem interesting. (I presume this is if you do a backup
> > every 12 hours?)
> 
> You can do the backup as often or as frequently as you like. it will pick
> the version before the time to specify.
> 
> > When Does it do a Full backup?
> 
> The first time you run it. But then each subsequent backup you do becomes
> the full one with the older files being the "incrementals". Basically,
> it keeps a full mirror of the directory you backup, plus the information
> needed to reconstruct older or deleted files.
> 
> 
> -- 
> Neil Bothwick
> 
> God: What one human uses to persecute another.




pgpBHAPOJvpju.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Neil Bothwick
On Wed, 29 Jun 2005 17:45:52 +0800, Ow Mun Heng wrote:

> > rdiff-backup --restore-as-of 1D12h /backup/path/to/file
> > 
> > will restore file to the version you used 36 hours ago.
> 
> Wow.. That does seem interesting. (I presume this is if you do a backup
> every 12 hours?)

You can do the backup as often or as frequently as you like. it will pick
the version before the time to specify.

> When Does it do a Full backup?

The first time you run it. But then each subsequent backup you do becomes
the full one with the older files being the "incrementals". Basically,
it keeps a full mirror of the directory you backup, plus the information
needed to reconstruct older or deleted files.


-- 
Neil Bothwick

God: What one human uses to persecute another.


pgpQA2OkL9138.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Ow Mun Heng
On Wed, 2005-06-29 at 10:16 +0100, Neil Bothwick wrote:
> On Wed, 29 Jun 2005 16:43:44 +0800, Ow Mun Heng wrote:
> 
> > > Unlike rsync, it allows you to easily roll back to an older version of
> > > file. Very useful when you realise you have screwed your configs just
> > > after a backup run.
> > 
> > BTW, librsync = rsync protocol/algo? Same thing?
> > 
> > Please explain the roll back. it should be the same as with rsync No?
> 
> No. rdiff-backup keeps a a backup plus diffs. You can roll back as
> far as you want just by specifying the age.
> 
> rdiff-backup --restore-as-of 1D12h /backup/path/to/file
> 
> will restore file to the version you used 36 hours ago.

Wow.. That does seem interesting. (I presume this is if you do a backup
every 12 hours?)

When Does it do a Full backup?
> Check out the rdiff-backup web site, it gives several examples of how it
> can be used - http://www.nongnu.org/rdiff-backup/ 

Yep.. Thanks.. Will do once I get some I-net access.

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 17:44:48 up 1 day, 4:31, 4 users, load average: 1.54, 1.27,
0.98 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Neil Bothwick
On Wed, 29 Jun 2005 16:43:44 +0800, Ow Mun Heng wrote:

> > Unlike rsync, it allows you to easily roll back to an older version of
> > file. Very useful when you realise you have screwed your configs just
> > after a backup run.
> 
> BTW, librsync = rsync protocol/algo? Same thing?
> 
> Please explain the roll back. it should be the same as with rsync No?

No. rdiff-backup keeps a a backup plus diffs. You can roll back as
far as you want just by specifying the age.

rdiff-backup --restore-as-of 1D12h /backup/path/to/file

will restore file to the version you used 36 hours ago.

It is much easier and more flexible than plain rsync, especially if you
set it to backup important directories via cron. I have it backup /etc
every hour, so even if I did use etc-update -5, I would find it hard to
completely screw things up :)

Check out the rdiff-backup web site, it gives several examples of how it
can be used - http://www.nongnu.org/rdiff-backup/ 


-- 
Neil Bothwick

As of next week, passwords will be entered in Morse code.


pgpcii1f0a0VM.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Ow Mun Heng
On Wed, 2005-06-29 at 09:24 +0100, Neil Bothwick wrote:
> On Wed, June 29, 2005 5:08 am, Ow Mun Heng said:
> 
> >> I do, however, intend to test rdiff-backup later. ;)
> >
> > Well.. there is more than one way to skin the cat eh.
> >
> > I still think you should take a look at rsync.
> 
> rdiff-backup uses librsync, so it only transfers the minimum necessary.

I do agree that rdiff-backup would be easier on the disk space. But my
current practice is to sync all the changes into a tree that rotates
every 7 days. (using the day before as a seed)

This way, if bad things happen, I don't have to do the find full backup
and apply the incrementals.

> Unlike rsync, it allows you to easily roll back to an older version of
> file. Very useful when you realise you have screwed your configs just
> after a backup run.

BTW, librsync = rsync protocol/algo? Same thing?

Please explain the roll back. it should be the same as with rsync No?



-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 16:41:20 up 1 day, 3:28, 4 users, load average: 1.10, 1.18,
0.92 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-29 Thread Neil Bothwick

On Wed, June 29, 2005 5:08 am, Ow Mun Heng said:

>> I do, however, intend to test rdiff-backup later. ;)
>
> Well.. there is more than one way to skin the cat eh.
>
> I still think you should take a look at rsync.

rdiff-backup uses librsync, so it only transfers the minimum necessary.
Unlike rsync, it allows you to easily roll back to an older version of a
file. Very useful when you realise you have screwed your configs just
after a backup run.


-- 
Neil Bothwick



-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-28 Thread Ow Mun Heng
On Wed, 2005-06-29 at 02:39 +, Raphael Melo de Oliveira Bastos Sales
wrote:
> First of all, thanks for all who replied. 
> 
> It is the end of semester here, and I didn't have time (until now) to
> read all the posts.
> 
> I have to admit, I made a newbie mistake when posting this message. I
> forgot to mention that I have Apache with SSL running. Thus, what I
> decided to do, was to create tar.bz2 files of backups, link them to an
> Apache directory, and download them from the machine that would
> receive the backup files. I feel this way I have to install no new
> software, gets the job done and let Apache take care of security.
> 
> I do, however, intend to test rdiff-backup later. ;)

Well.. there is more than one way to skin the cat eh.

I still think you should take a look at rsync. 

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 12:08:17 up 22:55, 6 users, load average: 2.40, 2.27, 2.25 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-28 Thread Raphael Melo de Oliveira Bastos Sales
First of all, thanks for all who replied. 

It is the end of semester here, and I didn't have time (until now) to
read all the posts.

I have to admit, I made a newbie mistake when posting this message. I
forgot to mention that I have Apache with SSL running. Thus, what I
decided to do, was to create tar.bz2 files of backups, link them to an
Apache directory, and download them from the machine that would
receive the backup files. I feel this way I have to install no new
software, gets the job done and let Apache take care of security.

I do, however, intend to test rdiff-backup later. ;)

Thanks again for the attention,

Raphael

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-27 Thread David Busby

Timo Boettcher wrote:

Hi David,

I would be very interested in this.

 Timo



Timo (and everyone else)
  I've posted that script so you can use it, added some documentation.  It's 
available here:

http://www.edoceo.com/creo/remote-host-secure-backup.php

/djb
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-26 Thread Ow Mun Heng
On Sat, 2005-06-25 at 12:27 +0200, Timo Boettcher wrote:
> Hi David,
> 
> * David Busby <[EMAIL PROTECTED]>, Saturday, June 25, 2005, 1:26:27 AM:
> 
> > I use a shell script that connects to my machines via ssh and
> > performs commands to: 
> [...]
> > I made it so that there is a config file that describes the backup
> > as: host, db (yes/no), dir list. The machines are firewalled and the
> > ssh is only allowed when signed by my trusted CA (me as well) so I
> > feel pretty secure about it. Rsync allows me to throttle the
> > connection to so I don't chew all my bandwidth on the backups. Let
> > me know if you want a copy and I'll pull all my specifc stuffs out
> > and post a copy. Cheers.
> > /djb
> 
> I would be very interested in this.

from Man Rsync

 --bwlimit=KBPS
  This option allows you to specify a maximum transfer rate
in  kilobytes  per  second.
  This  option  is  most effective when using rsync with
large files (several megabytes
  and up). Due to the nature of rsync transfers, blocks of
data are sent, then if rsync
  determines  the  transfer  was  too  fast,  it will wait
before sending the next data
  block. The result is an average transfer rate equalling
the specified limit. A  value
  of zero specifies no limit.



> 
> 
>  Timo
> 

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 11:35:05 up 3:29, 6 users, load average: 0.48, 0.52, 0.47 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-25 Thread Timo Boettcher
Hi David,

* David Busby <[EMAIL PROTECTED]>, Saturday, June 25, 2005, 1:26:27 AM:

> I use a shell script that connects to my machines via ssh and
> performs commands to: 
[...]
> I made it so that there is a config file that describes the backup
> as: host, db (yes/no), dir list. The machines are firewalled and the
> ssh is only allowed when signed by my trusted CA (me as well) so I
> feel pretty secure about it. Rsync allows me to throttle the
> connection to so I don't chew all my bandwidth on the backups. Let
> me know if you want a copy and I'll pull all my specifc stuffs out
> and post a copy. Cheers.
> /djb

I would be very interested in this.


 Timo

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread David Busby

* Raphael Melo de Oliveira Bastos Sales <[EMAIL PROTECTED]>,
Friday, June 24, 2005, 8:27:02 PM: 

I have one machine (Machine 1) that I need backup its files
periodically. I also have another machine (Machine 2) that will hold
the backup. Machine 2 can "see" (make requests to) Machine 1, but the
opposite isn't true. The network is covered by a firewall, so I don
need a paranoid solution. I was thinking about doing the following:




I use a shell script that connects to my machines via ssh and performs commands 
to:
1. Backup Postgres with pg_dump
2. turn last weeks log files into tgz
3. rsync my /etc, /opt/edoceo (that's where I put my stuff) and other dirs

I made it so that there is a config file that describes the backup as: host, db 
(yes/no), dir list.
The machines are firewalled and the ssh is only allowed when signed by my trusted CA (me as well) so I feel pretty 
secure about it.  Rsync allows me to throttle the connection to so I don't chew all my bandwidth on the backups.  Let me 
know if you want a copy and I'll pull all my specifc stuffs out and post a copy.  Cheers.


/djb
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread Neil Bothwick
On Fri, 24 Jun 2005 21:11:00 +0200, Charles Oertel wrote:

> There is also a technique where rsync will give you daily incrementals 
> with very little storage space loss  (google for it).

That's what rdiff-backup does.


-- 
Neil Bothwick

IBM: Inferior But Marketable.


pgpvRFZPIcXSq.pgp
Description: PGP signature


Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread Timo Boettcher
Hi Raphael,


* Raphael Melo de Oliveira Bastos Sales <[EMAIL PROTECTED]>,
Friday, June 24, 2005, 8:27:02 PM: 

> I have one machine (Machine 1) that I need backup its files
> periodically. I also have another machine (Machine 2) that will hold
> the backup. Machine 2 can "see" (make requests to) Machine 1, but the
> opposite isn't true. The network is covered by a firewall, so I don
> need a paranoid solution. I was thinking about doing the following:
[strange idea involving netcat]
> But before doing this, I'd like some suggestions or may be some better
> solutions you guys might know.
[...]

Using netcat, you would send all your data, including the login
passwords to your machine, its ssh-host-key and so on, unencrypted
over your network. You don't want that, except when its a cross-cable
and the machines are just some meters apart...

Why not use ssh?

>From machine 2 you can

ssh [EMAIL PROTECTED] "cd /; tar --exclude=./proc --excluse=./sys -cz
." | dd of=/backupfrommachine1.tgz

With minor changes, you could use that in the other direction, too.

cd /; tar --exclude=./proc --excluse=./sys -cz . | ssh
[EMAIL PROTECTED] "dd of=/backupfrommachine1.tgz"

HTH

 Timo


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread Charles Oertel

Raphael Melo de Oliveira Bastos Sales wrote:

I have one machine (Machine 1) that I need backup its files
periodically. I also have another machine (Machine 2) that will hold
the backup. Machine 2 can "see" (make requests to) Machine 1, but the
opposite isn't true. The network is covered by a firewall, so I don
need a paranoid solution. I was thinking about doing the following:



Why not just do:
rsync -zave ssh LiveBoxFolder [EMAIL PROTECTED]:/var/backup/LiveBox

To avoid problems with ssh prompting for passwords, you copy the public 
key of the LiveBox account running the rsync (probably root) to the 
"user" home directory

#cat root.publickey >> /home/user/.ssh/authorized_keys2

The benefit of rsync is that it only copies changes (so you can run 
backups more often), it is easy to get to the backed up files, you don't 
lose big chunks of data if your tarball gets a bad sector etc etc


There is also a technique where rsync will give you daily incrementals 
with very little storage space loss  (google for it).


regards
--
Charles Oertel
FineBushPeople.net
tel: 021 701 8231
fax: 021 701 3338

-=-=-
... A self-addressed envelope would be addressed 'envelope'.
-=-=-
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread Bryan Whitehead

Use rsh to just pip data over with rsync? Use iptables to restrict rsh...

On Fri, 24 Jun 2005, Raphael Melo de Oliveira Bastos Sales wrote:


Hi there,

I have one machine (Machine 1) that I need backup its files
periodically. I also have another machine (Machine 2) that will hold
the backup. Machine 2 can "see" (make requests to) Machine 1, but the
opposite isn't true. The network is covered by a firewall, so I don
need a paranoid solution. I was thinking about doing the following:

On Machine 1, put it on the crontab to put netcat waiting for
requests, and when it did receive a request, dump the files. Like
this:

tar -jc / | nc -l -p 500

And on the crontab of Machine 2, I'd put something like this, only a
few minutes later, to avoid any errors from clock differences:

nc machine1 500 > backup.tar.bz2

But before doing this, I'd like some suggestions or may be some better
solutions you guys might know.

Thanks for the attention,

Raphael.




--
Bryan Whitehead
Email:[EMAIL PROTECTED]
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Disk Backup From One Machine To Another

2005-06-24 Thread Neil Bothwick
On Fri, 24 Jun 2005 15:27:02 -0300, Raphael Melo de Oliveira Bastos Sales
wrote:

> I have one machine (Machine 1) that I need backup its files
> periodically. I also have another machine (Machine 2) that will hold
> the backup. Machine 2 can "see" (make requests to) Machine 1, but the
> opposite isn't true.

Run the backup program on machine 2. rdiff-backup is good for this.


-- 
Neil Bothwick

Q. How does Batman's wife call him for dinner?
A. Dinner dinner dinner dinner dinner dinner dinner dinner - Batman!


pgpDAt5BmyTpA.pgp
Description: PGP signature