Koozali.org: home of the SME Server

How does the backup work ?

Arne

How does the backup work ?
« on: December 08, 2003, 02:27:14 PM »
Hello everybody !

For different reasons I have found out that it is a good thing to try to understand my very exelent homeserver a little bit more. (E-smith 5.6 with div add on's.)

One thing I am really curious about is how this backup routine that makes the backup to the desk top work.

I understand that there is a program that is caled Flexbackup that is a part of the sme 5.6 installation. http://flexbackup.sourceforge.net/

But I don't know if this program makes the backup to the workstation also or if it only perform the tape backup if you have such a function.

I understand that all functions from the administration panel is performed by a number of routines written in Perl. This will also include the routine(s) that performs the backup, I will guess.

Does anybody know where the backup to desctop perl script(s) is located, so it is possible to go into it and take a look and see how it works ?? (Actually I have never made a Perl script in all of my life so far, but I just bought a book just now, and it seems like it is possible to read Perl scripts like any other scripts.)

I would be very thankfull if there is anybody "outh there" who knows a bit how things works "behind the dark curtains".

Best reg Arne.

Arne

Re: How does the backup work ?
« Reply #1 on: December 09, 2003, 12:43:07 AM »
I have now been performing a bacup to the desctop while I were monitoring the running prosesses and the trafick to from the desctop and to from the server.

It seems like the bacup to desktop involves these tree prosesses:

1. Perl
2. Gzip
3. Tar

The ip trafic seems to be going trough the port http 80 communiacation that is allready set up between the server manager and the client (I had expected this to be a Samba trafic, but this seems not to be the case .. By the way I have olso once performed such a backup via intenet, so it has to be a http, port 80 trafic.)

I then went down to the web side for the backup control and checked the source code. I found amoung other this:



I then searced for a script named "backup".

I found a perl script with this name in this location:

/etc/e-smith/web/panels/manager/cgi-bin

(Full pathname: "/etc/e-smith/web/panels/manager/cgi-bin/backup")

As this is the first (and exiting) Perl i ever have seen in my life, I am no expert in doing the reading of this script.

This open source software is now said to be handeled over to the users as the Mitel is stopping their furter development. To do so it should be a lot of things to first find out about this exelent software.

If some of you that is more experienced with this software than me can read out sometning from this script, that I can not, or if you know something more about theese thing, I would be very interested.

By the way, .. does anybody of you have any idea abut this or those certain script(s) that is erazing the conf files and replacing these with new files ??

I hope that I am not a hacker in some bad or evil way, but if one should be able to "maintain" or change anything, it will be first neccessary to find out how things work. If any objections against such an "exploration", please leve a message ! :)

Boris

Re: How does the backup work ?
« Reply #2 on: December 09, 2003, 01:00:39 AM »
You are confusing two different backups.
1. flexbackup. Its only activated (as a scheduled job or manualy) if you have tape drive and enable tape backup in the server-manager. Its using utility to control the tape drive unit, handle database of the backups and notifications via e-mail to admin.

2. What you you are using is different backup solution. Its basicaly cgi (perl) script(s), that tar/gzip key files and folders and sends resulted archive file to your workstation via open web (http) session.

for your "exploration" I would start from the manuals found on the e-smith.org page and some generic "Linux for beginners" type of books.

Arne

Re: How does the backup work ?
« Reply #3 on: December 09, 2003, 01:41:09 AM »
Hello Boris and thanks for your comments !!

I actually have been reading Linux books at least for the 5-6 years and also made some training according to theese books, even though I have so far red zero books about Perl.

I have also gone trough the docomentation I could find at e-smith.org and the other docomentation I could find at the net.

According to the information I could find, I think it were mentioned somewhere that the Perl scripts that is performing the administrative tasks at the e-smith distribution consists of approx 20.000 lines of code. (Frankly don't remeber where I red this number.)

I think none of my Linux books says anything or at least very little about perl scripts, but I just now borrowed two books about perl script at the liberary so I hope to learn a little. (At least I beieve it is "just" scripting and not compiled code.)

As far as I can see theese Perl scripts works together like a "information chain", there is generally not one script that is "doing the job" the general priciple is as far as I understand that scripts are calling each other like a "chain", so the "general job" is done by more than one script.

If tracing down theese things and finding out how it work and how things is working together is considered to be "no good", please leave a message.  

I have searced over the net to find such an "overall" explanation of how the e-smith and the system modules works together, but I haven't found it.

Arkman

Re: How does the backup work ?
« Reply #4 on: December 09, 2003, 02:41:42 AM »
Arne,
 Not sure if you've found this stuff...

http://www.e-smith.org/architecture/
http://www.e-smith.org/concepts/
http://www.e-smith.org/custom/
http://www.e-smith.org/docs/perldoc/
http://www.e-smith.org/docs/papers/

While none of these documents will teach you Perl they will give you an understanding/overview of how Perl is used in SME configuration.

Good luck!

--Noah

Arne

Re: How does the backup work ?
« Reply #5 on: December 09, 2003, 03:18:30 AM »
Hello Arkman !

No I had not found all of this docs, so thanks a lot !

The docs explains in general terms, I think how things works but not
the "mechanisms" behind that make things happen.

But on the other hand it seems to be not do difficult to trace down the
location of the Perl scripts that is performing the diffrent fuctions, as they
are described in the documentationf.

Have traced down these Perl script directories so far:

/sbin/e-smith/

/etc/e-smith/web/panels/manager/cgi-bin/

No perl scrips but config files:

/home/e-smith/

/home/e-smith/configuration/

And then Perl scripts into "the smaller and deeper":

/usr/lib/perl5/site-perl/esmith/


Dont know if there is more.


Did find some directories with kernel modules, I think. Think it should be no reason to do anything with this so far.


I'm generally thankful for all further information.


Uhh .. now 2-3 hours sleep before going to job ...


Best reg Arne.