Koozali.org: home of the SME Server

[ANNOUNCE] smeserver-backuppc

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-backuppc
« Reply #75 on: August 11, 2006, 07:20:46 PM »
ok, I've just finished the packaging of my contrib. It's my very first rpm, so I post here before anouncing it's stable.

The how-ti is up-to-date too.

rpm:

http://sme.firewall-services.com/files/backuppc/smeserver-backuppc-1.0-1.noarch.rpm

srpm

http://sme.firewall-services.com/files/backuppc/smeserver-backuppc-1.0-1.src.rpm

how-to

http://sme.firewall-services.com/files/backuppc/smeserver-backuppc-1.0-1.pdf

There were some changes:

* As I consider older release as beta, the version number is 1.0

* You needn't anymore to create the user backuppc or the group backups (you must delete them before installing it if they exists)

* The differents binarys are now in the /usr/local/bin directory

* The rsync function has been review as there were several problems

* The save/restore function is totally different that's why you will loose your configuration (not the per pc configuration but the general one) if you were using an old version and you want to install this one. you can try to save it before uninstalling the old one:

cp /home/e-smith/db/backuppc /home/e-smith/files/ibays/backup/files/save/backuppc_db

it should work if you were using v1.2 but before, you may enconter problem. Then to restore the configuration, go in the panel and choose 'restore the configuration'

I think that's all for now.
C'est la fin du monde !!! :lol:

jcoleman

[ANNOUNCE] smeserver-backuppc
« Reply #76 on: August 12, 2006, 03:51:04 AM »
Just installed your new rpm on my 7 server.  First did a backup of the config db and then uninstalled the old version using your uninstall script.

On re-install I got some errors about dependencies and had to add the perl modules manually.  OK so far.  

I then got the following error messages on install...

Code: [Select]
WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/86WebShareAlias: *WARNING* esmith::config(/home/e-smith/WebShare) called with old database path. The following package needs to be updated:  at /usr/lib/perl5/site_perl/esmith/config.pm line 374
        esmith::config::TIEHASH('esmith::config', '/home/e-smith/WebShare') called at /etc/e-smith/templates//etc/httpd/conf/httpd.conf/86WebShareAlias line 6
        eval 'package esmith::__TEMPLATE__::1; ;
#line 1 /etc/e-smith/templates//etc/httpd/conf/httpd.conf/86WebShareAlias

    use esmith::config;
    use esmith::db;

    local %WebShare;
    tie %WebShare, \'esmith::config\', \'/home/e-smith/WebShare\';

        my $webshare;

        foreach $webshare (db_get(\\%WebShare))
        {
            my $type = db_get_type(\\%WebShare, $webshare);

            if ($type eq "WebShare")
                {
                $OUT .= "# webshare\\/$webshare\\n";
                $OUT .= "Alias \\/webshare\\/$webshare \\/opt\\/webshare\\/$webshare\\n";
                $OUT .= "<Directory \\/opt\\/webshare\\/$webshare>\\n";
                {
                use esmith::util;
                my $release = esmith::util::determineRelease();
                if ("$release" ge "7.0")
                        {
                        $OUT .= "    SSLRequireSSL\\n";
                        }
                        else
                        {
                        $OUT .= "    RequireSSL on\\n";
                        }
 }
                $OUT .= "    Options +Indexes\\n";
                $OUT .= "    AllowOverride None\\n";
                $OUT .= "    order deny,allow\\n";
                $OUT .= "    deny from all\\n";
                $OUT .= "    allow from all\\n";
                $OUT .= "    AuthName \\"Restricted $webshare access only\\"\\n";
                $OUT .= "    AuthType Basic\\n";
                $OUT .= "    AuthUserFile \\/etc\\/httpd\\/conf\\/htpasswd\\.$webshare\\n";
                $OUT .= "    Require valid-user\\n";
                $OUT .= "    AddType application\\/x-httpd-php \\.php \\.php3\\n";
                $OUT .= "    php_flag  magic_quotes_gpc  on\\n";
                $OUT .= "    php_flag  track_vars        on\\n";
                $OUT .= "<\\/Directory>\\n";
                $OUT .= "\\n";
                }
        }
;' called at /usr/lib/perl5/vendor_perl/5.8.5/Text/Template.pm line 319
        Text::Template::fill_in('Text::Template=HASH(0x8eb839c)', 'HASH', 'ARRAY(0x8cf0f80)', 'PACKAGE', 'esmith::__TEMPLATE__::1', 'BROKEN', 'CODE(0x8e46608)', 'UNTAINT', 1, ...) called at /usr/lib/perl5/vendor_perl/5.8.5/Text/Template.pm
line 382
        Text::Template::fill_in_file('/etc/e-smith/templates//etc/httpd/conf/httpd.conf/86WebShareA...', 'HASH', 'ARRAY(0x8cf0f80)', 'PACKAGE', 'esmith::__TEMPLATE__::1', 'BROKEN', 'CODE(0x8e46608)', 'UNTAINT', 1, ...) called at /usr/lib/perl5/site_perl/esmith/templates.pm line 528
        esmith::templates::processTemplate('HASH(0x8b1c430)') called at /sbin/e-smith/expand-template line 45
WARNING: Template processing succeeded for //etc/httpd/conf/httpd.conf: 1 fragment generated warnings
 at /sbin/e-smith/expand-template line 45
Restarting httpd-e-smith [  OK  ]
Starting BackupPC: [  OK  ]


While the db restores and the backuppc deamon appears all good, I now get a segmentation fault at any signal-event post-update or reboot call.

Pretty clear that it doesn't like the webshare contrib, but do you see a recovery option here?

Cheers,

-jeff

jcoleman

[ANNOUNCE] smeserver-backuppc
« Reply #77 on: August 12, 2006, 04:11:55 AM »
Update -

Removed backuppc rpm via rpm -e.  Removed webshare rpm via rpm -e.  Reboot.

Next - test signal-event post-update and reboot.  Both work properly.

Reinstall smeserver-backuppc rpm without webshare on system....

On install the rpm tells me that the backuppc user and group are there.  This should not be true as they were supposed to be removed by prior uninstall.  Install proceeds without error and all works, except....

In server-manager neither the user nor the group shows.  The user and group db? is no longer in sync with server-manager.  

Any ideas?

-jeff

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-backuppc
« Reply #78 on: August 12, 2006, 01:35:17 PM »
Well I have no idea for the conflict between backuppc and webshare. Where can I download the webshare contrib to look further and try to arrange this thing?

The user and the group backuppc are now craeted by the rpm as system user and group (uid<500) that's why you do not see them anymore in the server-manager. This prevent the user to have a home directory and all that a normal user have, for example, backuppc do not have access anymore to the openvpn server.
C'est la fin du monde !!! :lol:

Offline raem

  • *
  • 3,972
  • +4/-0
[ANNOUNCE] smeserver-backuppc
« Reply #79 on: August 12, 2006, 02:26:29 PM »
jeff

> Pretty clear that it doesn't like the webshare contrib....

The webshare contrib is broken for sme7, it points at the wrong db path
See http://bugs.contribs.org/show_bug.cgi?id=1175

As a workaround I edited
/etc/e-smith/templates//etc/httpd/conf/httpd.conf/86WebShareAlias line 6 to:

tie %WebShare, \'esmith::config\', \'/home/e-smith/db/WebShare\';
and did
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart


As Charlie points out though, this leaves the contrib subject to breakage at upgrade time, and it needs a good rewrite as well for other reasons.
...

jcoleman

[ANNOUNCE] smeserver-backuppc
« Reply #80 on: August 12, 2006, 03:13:44 PM »
Quote
The user and the group backuppc are now craeted by the rpm as system user and group (uid<500) that's why you do not see them anymore in the server-manager. This prevent the user to have a home directory and all that a normal user have, for example, backuppc do not have access anymore to the openvpn server.


VIP-ire...that makes sense to me and definately reduces the anxiety level  :-) Thanks for letting me know.

Quote
The webshare contrib is broken for sme7, it points at the wrong db path


Thanks Ray, I had thought Darrell had released this version for SME 7 but evidently not.  While webshare is convenient, it is pretty easy to give up for the functionality of Backuppc.

This is a great addition to the SME community.  I am really glad to have this app available.  It makes the drugery of trying to backup user data disappear.

Thanks for the quick responses.....

-jeff

Offline raem

  • *
  • 3,972
  • +4/-0
[ANNOUNCE] smeserver-backuppc
« Reply #81 on: August 12, 2006, 03:24:00 PM »
jeff

> While webshare is convenient, it is pretty easy to give up for the functionality of Backuppc.

Well webshare does work OK if you make the changes I mentioned.
Hopefully someone capable will release a revised webshare later.
...

Offline raem

  • *
  • 3,972
  • +4/-0
[ANNOUNCE] smeserver-backuppc
« Reply #82 on: August 12, 2006, 03:34:52 PM »
VIP-ire

> http://sme.firewall-services.com/files/backuppc/smeserver-backuppc-1.0-1.pdf

The link is broken
Not Found
The requested URL /files/backuppc/smeserver-backuppc-1.0-1.pdf was not found on this server.
...

jcoleman

[ANNOUNCE] smeserver-backuppc
« Reply #83 on: August 12, 2006, 05:40:02 PM »
Daniel,

New issue:  

For the first time backuppc errored out on the localhost with the following log message:

Code: [Select]
Executing DumpPreUserCmd: /usr/bin/sudo /sbin/e-smith/signal-event pre-backup
/usr/bin/sudo: /etc/sudoers is mode 0644, should be 0440
Running: /usr/bin/sudo /bin/tar -c -v -f - -C / --totals --newer=2006-08-09 22:00:02 --exclude=./proc --exclude=./sys --exclude=./dev --exclude=./tmp --exclude=./home/e-smith/files/ibays/backup .
Xfer PIDs are now 6937,6936
/usr/bin/sudo: /etc/sudoers is mode 0644, should be 0440
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal
Tar exited with error 256 () status
Got fatal error during xfer (Tar exited with error 256 () status)
Backup aborted (Tar exited with error 256 () status)


Looks like the sudoers cmd has the wrong permissions?  

BTW, it's great that you have included pre-backup in the script!

-jeff

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-backuppc
« Reply #84 on: August 14, 2006, 01:59:24 AM »
Quote from: "RayMitchell"
VIP-ire

> http://sme.firewall-services.com/files/backuppc/smeserver-backuppc-1.0-1.pdf

The link is broken
Not Found
The requested URL /files/backuppc/smeserver-backuppc-1.0-1.pdf was not found on this server.


ok, I don't know where this file has gone, I've put it again and it's now available
C'est la fin du monde !!! :lol:

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-backuppc
« Reply #85 on: August 14, 2006, 02:13:41 AM »
Quote from: "jcoleman"
Daniel,

New issue:  

For the first time backuppc errored out on the localhost with the following log message:

Code: [Select]
Executing DumpPreUserCmd: /usr/bin/sudo /sbin/e-smith/signal-event pre-backup
/usr/bin/sudo: /etc/sudoers is mode 0644, should be 0440
Running: /usr/bin/sudo /bin/tar -c -v -f - -C / --totals --newer=2006-08-09 22:00:02 --exclude=./proc --exclude=./sys --exclude=./dev --exclude=./tmp --exclude=./home/e-smith/files/ibays/backup .
Xfer PIDs are now 6937,6936
/usr/bin/sudo: /etc/sudoers is mode 0644, should be 0440
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal
Tar exited with error 256 () status
Got fatal error during xfer (Tar exited with error 256 () status)
Backup aborted (Tar exited with error 256 () status)


Looks like the sudoers cmd has the wrong permissions?  

-jeff


Well, I don't know how this permission could have change as the modification of /etc/sudoers are done through templates. the expanding of this file should give it the right permissions. Maybe it's while uninstall, the script delete the file /etc/sudoers, delete the templates of backuppc and then expand /etc/sudoers to make sure the modifications has been removed.
I'll try to change this by flushing the file with a echo '' > /etc/sudoers instead of deleting it
C'est la fin du monde !!! :lol:

Offline jahlewis

  • *
  • 151
  • +0/-0
    • http://www.arachnerd.com/
[ANNOUNCE] smeserver-backuppc
« Reply #86 on: August 17, 2006, 04:08:47 AM »
Successfully backing up localhost and a WinXP laptop.

I'm having trouble connecting to a Mac OS X to use the tar method.  From what I can tell it is a SSH key issue.

What is the best method to allow the backuppc user to log into *nix clients?

To get it to work, I had to allow backuppc to use a bash shell, generate a rsa key, then copy the public key into the client's authorized_keys2 file.

Could you use the RPM to generate keys for the backuppc user during install?  Then instructions on what to past into clients will be much easier, especially if made available via the server-manager...

Thanks.

-JL
............

Offline del

  • *
  • 765
  • +0/-0
[ANNOUNCE] smeserver-backuppc
« Reply #87 on: August 17, 2006, 05:09:26 AM »
Hi,

I have installed and used D. Mays webshare for SME 7.x  and it works OK without any mods, it can be found here: http://mirror.contribs.org/smeserver//contribs/dmay/smeserver/7.x/smeserver-webshare-1.0.0-6dmay.noarch.rpm

Hope this helps,
Del :pint:
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

Offline raem

  • *
  • 3,972
  • +4/-0
[ANNOUNCE] smeserver-backuppc
« Reply #88 on: August 17, 2006, 06:00:54 AM »
del

> I have installed and used D. Mays webshare for SME 7.x  and it works
> OK without any mods, it can be found here:

Well that's the funny thing, it does install OK without errors and you can actually configure a webshare and use it OK, but....when you install some other contrib that expands templates, you will get webshare related errors, and will need to make the mods I suggested earlier in this thread.
Also see the bugtracker for feedback.
...

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-backuppc
« Reply #89 on: August 17, 2006, 09:53:42 AM »
Quote from: "jahlewis"
Successfully backing up localhost and a WinXP laptop.

I'm having trouble connecting to a Mac OS X to use the tar method.  From what I can tell it is a SSH key issue.

What is the best method to allow the backuppc user to log into *nix clients?

To get it to work, I had to allow backuppc to use a bash shell, generate a rsa key, then copy the public key into the client's authorized_keys2 file.

Could you use the RPM to generate keys for the backuppc user during install?  Then instructions on what to past into clients will be much easier, especially if made available via the server-manager...

Thanks.

-JL


For remote *nix access, I use rsync, wich use by default ssh. I'll try to see if it's possible to ask during the installation for the generation of an ssh key, or maybe a section in the panel to do this. I'm still working on improving this so your suggest is welcom.
C'est la fin du monde !!! :lol: