Koozali.org: home of the SME Server

SME7 remote backup to my server

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
SME7 remote backup to my server
« on: March 03, 2009, 11:42:20 AM »
Hi

I have several SME7 servers installed on clients who  use VERY SMALL amount of data (<100MB when gziped! All lawyers so just .doc files) and I'd like to use my own home server as external backup media.

I want to be able to upload files to my SME7 server using command line in a secure way. It must be done without human intervention, because that must be done automagically at 2 am each day! :D

I create a script to targz home directories and upload to external ISP (Bluehost) using FTP: works great! (if you need this, just write me a PM or ask here and I'll send you!). Used it with BlueHost ISP before they block my account because this is against ToS! :(
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: SME7 remote backup to my server
« Reply #1 on: March 03, 2009, 12:35:40 PM »
hi

I strongly suggest you to use scp instead of ftp.. because "ftp" and "command line in a secure way" cannot live together ;-)

HTH
Ciao
Stefano

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SME7 remote backup to my server
« Reply #2 on: March 03, 2009, 01:41:57 PM »
Hi Stefano

I´d love to use scp, but my server is locked to accept ssh connection with SSH keys, no password connections at all!
So are you suggesting I create a ssh key to uploads and spread it among all SME servers ?
I have phpWebFTP installed and working. Maybe this could be used if I can get a command line for it.

Thanks

Jáder

...

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: SME7 remote backup to my server
« Reply #3 on: March 03, 2009, 03:09:42 PM »
jader,

Is there some reason Affa wouldn't work for this?

http://wiki.contribs.org/Affa

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SME7 remote backup to my server
« Reply #4 on: March 03, 2009, 04:31:43 PM »
jader,
Is there some reason Affa wouldn't work for this?
http://wiki.contribs.org/Affa

Not sure... I think it would work... but isn´t it overkill ?

And it still needs a way to transfer backups to my home server... I suppose (by reading features at a glance) it would be ssh (w/key) or rsync. Which one do you recomend ?
To use SSH  I need to create another ssh key and spread it on several servers or create on for each server.  Other problem would be a great configuration on my home server just to receive small backups once a day or even once a week.

There are any other options ?

Thanks

Jáder
...

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: SME7 remote backup to my server
« Reply #5 on: March 03, 2009, 04:58:45 PM »
It may be overkill but everything is there that you need and it just works.

I would rather spend 1 hour installing a program and configuring something that was well supported that I only used 1/4th of its capabilities then spend 5 hrs reinventing something that I used all of but had to support myself.


It  uses RSYNC over SSH and it would need a separate key for each server as you outline above. The advantage is that once initial setup is done all jobs are managed and monitored on the backup server. Affa will manage all the file compression tasks and once the original backup is done RSYNC will only be bringing the changes over the network to your backup machine.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SME7 remote backup to my server
« Reply #6 on: March 03, 2009, 06:30:28 PM »
It may be overkill but everything is there that you need and it just works.

I would rather spend 1 hour installing a program and configuring something that was well supported that I only used 1/4th of its capabilities then spend 5 hrs reinventing something that I used all of but had to support myself.
OK. Got it... your point are valid ones!  Thanks.

Quote
It  uses RSYNC over SSH and it would need a separate key for each server as you outline above. The advantage is that once initial setup is done all jobs are managed and monitored on the backup server. Affa will manage all the file compression tasks and once the original backup is done RSYNC will only be bringing the changes over the network to your backup machine.
OK... ssh keys for each server.
One question: is affa cpu intensive ? I´m running SME7 on Via Ezra (933Mhz) w/1GB RAM.
...

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: SME7 remote backup to my server
« Reply #7 on: March 03, 2009, 06:45:34 PM »
Quote
One question: is affa cpu intensive ? I´m running SME7 on Via Ezra (933Mhz) w/1GB RAM.

I am running affa on an old workstation (only backing up a single SME production server on the LAN without a lot of data on it) The specs of the Affa box are P4 2.8ghz with 1gb of ram.

CPU usage shows less then 2% on the SME7ADMIN graph for the time that the job runs.

System load shows about 4 1/2%


Offline sal1504

  • ****
  • 149
  • +0/-0
Re: SME7 remote backup to my server
« Reply #8 on: March 04, 2009, 02:50:25 AM »
jader

what versions of SME Server do the clients have and will the clients allow you to establish a permanent vpn connection to their servers?

Sal

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: SME7 remote backup to my server
« Reply #9 on: March 04, 2009, 06:04:40 AM »
jader

I strongly recommend Affa as it exactly answers what you need.

It is fairly simple to setup and get running and needs no interaction or maintenance.
The work is done on the server that is being backed up (ie compresssion of files) before being sent across the Internet to the Affa backup server.

The backup server does not need to be the latest and greatest, main thing is disk size to accomodate the ongoing data being backed up. The other good point is that the backup is effectively incremental, so the increase in space used is relatively small each day.

It also takes care of all the security for the ssh connections etc (using keys), and the Affa program does it all for you, nothing you need to create in that regard. It even transfers the key to the other server or servers for each backup job.

I use Affa to backup a local sme server and two other remote sme servers, and it's as close to foolproof as you can get.

Follow the instructions carefully in the Howto and all will be well.

Give it a go, you won't be sorry.
You won't even notice that your home server is running Affa.

One warning, if you have a lot of data to backup initially ie 100Gb or so, then you must take the backup server to the site and run the first backup locally.
Then move the backup server back to it's remote location.
The regular daily backups will only transfer a much smaller amount of data.
« Last Edit: March 04, 2009, 07:20:18 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SME7 remote backup to my server
« Reply #10 on: March 04, 2009, 03:03:41 PM »
jader

what versions of SME Server do the clients have and will the clients allow you to establish a permanent vpn connection to their servers?

Sal

SME servers are 7.x (I think all 7.4 but not 100% sure).
About permanent VPN... no, that´s difficult because I have dynamic IP and some of clients too.
And there is no plans to have specialized HW do do this anyway... and my own server had low CPU to do this also (Via EZRA 933Mhz now).
...

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: SME7 remote backup to my server
« Reply #11 on: March 04, 2009, 03:20:58 PM »
Some discussion would indicate that RSYNC over SSH with shared keys is more secure then PPTP VPN anyway...

http://forums.contribs.org/index.php/topic,43454.0.html

One thing for sure is that the network complexity is much higher when joining a bunch of sites via VPN. (They all need to be on different subnets or some fancy NAT rules must be written.)

Quote
SME servers are 7.x (I think all 7.4 but not 100% sure).

When you set up affa there is an option to check if the production and backup box are at the same versions each time a backup job is run. Affa has the ability to "rise" the backup box to production status replacing the selected production server. If you intend to use Affa in this way (that the backup box will actually take the place of a production box in case of a failure) it is important to set this check to "on" and maintain all servers at the same version level.

If you are only using it to backup data which would be restored to a new server/the old production server and you do not intend to keep all servers at the same version level, you can turn this check off.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SME7 remote backup to my server
« Reply #12 on: March 04, 2009, 04:12:51 PM »
(...)
When you set up affa there is an option to check if the production and backup box are at the same versions each time a backup job is run. Affa has the ability to "rise" the backup box to production status replacing the selected production server. If you intend to use Affa in this way (that the backup box will actually take the place of a production box in case of a failure) it is important to set this check to "on" and maintain all servers at the same version level.
I do not intent do use it this way right now (Maybe in future ... not not).
I´ll backup .doc from lawyers and a .mdb APP/DATABASE from another client.

Edit: (deleted about not being sure how to use Affa... ofttopic!)

Thanks

Jáder


« Last Edit: March 04, 2009, 07:48:08 PM by jader »
...

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: SME7 remote backup to my server
« Reply #13 on: March 04, 2009, 10:43:29 PM »
jader,
if you decide to use Affa and you can't run the initial backup locally and then transfer the drive physically to your server, then just run Affa over the internet. If it uses to much bandwidth during working hours just kill the job with the affa --kill command. The job restarts at the next scheduled time, continuing at the point were it was stopped, i.e. without transferring already tranfsferred data again. This may last a few days, but will finally complete.

Offline the-heck

  • ***
  • 63
  • +0/-0
  • Chance favors the prepared mind.
Re: SME7 remote backup to my server
« Reply #14 on: March 12, 2009, 02:38:56 AM »
Yes it will take time the first time, but after rsynching.. it will be shorter.  In my case, affa over internet, backup time is less then 10mins @ 56Mbps with 90 heavy users of fileserver.

use affa, u wont regret it. it saves me so many times already, restoring files for users.
***************
·¨­­­°÷»the-heck«÷°¨·
***************