Subject: [alpine-devel] Backup Confing from remote alpine boxes ....

From: Harry Lachanas <[email-masked]>
Date: Thu, 15 Jan 2009 19:18:36 +0200

Hi all,

Since I don't want to re-invent the wheel,
is there a way to rsync remote alpine boxes ??? ( the alpine way :-)   )
Is there a package that does that ???

Their configuration lies on usb sticks,  ie not mounted constantly..

Thanks,
Harry.

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Nathan Angelacos <[email-masked]>
Date: Thu, 15 Jan 2009 13:14:19 -0500

Hi Harry,

> Their configuration lies on usb sticks,  ie not mounted constantly..

Natanael is the authority on "the alpine way"... but here's one way 
(you'll need 1.7.29 or higher, there was a bug in lbu writing to stdout 
before that)

ssh root@remotebox "lbu package -" >remotebox.apkovl.tar.gz

---

---

From: Harry Lachanas <[email-masked]>
Date: Fri, 16 Jan 2009 12:55:46 +0200

> (you'll need 1.7.29 or higher, there was a bug in lbu writing to 
> stdout before that)
>
Thank's Nathan,

I did it the opposite way,

Thus,

a remote server pulling and storing the config.

Harry.

---

---

From: Nathan Angelacos <[email-masked]>
Date: Fri, 16 Jan 2009 07:59:23 -0500

Hi Harry,

> a remote server pulling and storing the config.

That's what the above does..  I can back up your box to my box with the 
above command.

natebox#ssh root@harrybox "lbu package -" >harrybox.apkovl.tar.gz

I log into your box, run "lbu package -" on your machine, (the - writes 
the lbu archive to stdout) which I then redirect to the file 
harrybox.apkovl.tar.gz on my machine.

I now have a local copy of the remote machine's config.

 From your box's perspective a remote machine pulled and stored your 
config.

---

---

From: Harry Lachanas <[email-masked]>
Date: Fri, 16 Jan 2009 15:55:26 +0200

>
> That's what the above does..  I can back up your box to my box with 
> the above command.
>
That is correct --- Sorry!!
> I log into your box, run "lbu package -" on your machine, (the - 
> writes the lbu archive to stdout) which I then redirect to the file 

Instead I used rsync ...

a) mount remote usb via
#ssh root@nathans-box "mount /media/usb"

b) rsync -az -e ssh root@nathans-box:/media/usb /this/directory

c) umount remote via
#ssh root@nathans-box "umount /media/usb"

Your opinion ???

As U understand I have this as  cron job.....

that way I won't pull the config if it's not changed ....
of course some ping checks are performed beforehand, to see that the 
host is alive and some return values are checked etc... bla bla bla ....

The thing is I don't have 1.7.19+ on the boxes + the boxes won't boot 
with the default alpine image ( kernel modules + scd0 links are required 
) ....
+ the boxes are now installed 500 Km away ....

Thanks again Nathan.

Harry.

---