This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
1
Installation and Upgrades / Re: Trigger config backup from command line
« on: March 24, 2014, 01:29:30 pm »otoh, any chance you can share your script?
Of course
Code: [Select]
#!/bin/bash
date=`date "+%Y%m%d-%H%M%S"`
path=/media/usb0/ZentyalBackup
backup=$(/usr/share/zentyal/make-backup | grep -o "/var.*")
mv $backup $path/zentyal-$date.tar
rsync -av \
--delete-excluded \
--link-dest=$path/current \
--exclude-from='/home/administrator/rsync-exclude.txt' \
/ \
$path/backup-$date \
> $path/backup-$date.log
rm -f $path/current
ln -s $path/backup-$date $path/current
mail -s "Office server backup" me@my.domain.com < $path/backup-$date.log
I have cron running daily to do this on rotating backups, one per weekday - on any given day, that one is connected, and the previous one taken off-site, so I have 5 full+incremental backups. For those who are as shell-challenged as me (took a while to figure this out), the key points are:
- path= is luckily constant, since the first connected USB drive is always mounted at /media/usb0 - so this doesn't actually have to detect which day's backup is plugged in (and will still automatically back up if the wrong one is there)
- backup= handles running the Zentyal backup, and assigning the resulting path to backup; the next line moves it onto the USB
- the rsync command does the actual drive backup
- -a is archive, so recurses, preserves permissions, etc; v makes it verbose
- --exclude-from contains a list of stuff not to back up - /proc, /media, /mnt, etc
- --link-dest is the clever bit - if you point it at the previous backup, then unchanged files get hard linked from the previous backup to the new backup destination - making each backup appear complete even though it's actually incremental
- then the new backup is linked to a folder 'current' - the first time you run it, it's not there, so --link-dest is ignored and a full copy is made; thereafter 'current' is always the last backup so rsync can compare against that
- finally an email to let me know its done and send the rsync log
What you end up with is a dated folder for each backup. Each folder appears to be a full backup, even though only changed files are copied. It's very similar to Time Machine on Mac OS (one of the few features I miss - credit http://blog.interlinked.org/tutorials/rsync_time_machine.html for the idea). Zentyal's built in duplicity is probably more space-efficient, but I now prefer the transparency of using rsync; each backup is visible to browse through without needing any specific knowledge to restore.
It still needs a few changes - eg the rsync log is very big the first time, so I may tail it for the email rather than sending the whole thing. But suggestions, let me know!
2
Installation and Upgrades / Re: Trigger config backup from command line
« on: March 24, 2014, 09:43:08 am »config backup can be launched from /usr/share/zentyal/make-backup
This command will answer back something like "Backup stored into file /var/lib/zentyal/conf//backups/2013-07-11-120725.tar" which is where the backup will be stored(always under /var/lib/zentyal/conf/backups, and named YEAR-MONTH-DAY-HMS.tar)
This works a treat, thanks! Took a bit of fooling around to get the path out, but I now have a script that does the Zentyal config backup and incremental rsync of the drive to a rotating usb backup drive.
3
Installation and Upgrades / Re: Send email from the command line
« on: March 24, 2014, 09:41:15 am »
Many thanks for the replies - sendmail worked but I couldn't figure out how to do it in one go from a script... so installed mailutils and mail works just fine. Thanks!
4
Installation and Upgrades / Trigger config backup from command line
« on: March 21, 2014, 12:32:42 pm »
I like the Duplicity backup that's included with Zentyal, but I prefer the transparency of rsync so am switching to a snapshotted rsync backup via cron. But I'd also like to schedule a backup of the Zentyal config to the same destination (USB drive).
Is there a way to trigger the config backup from the command line - and ideally specify the destination?
Is there a way to trigger the config backup from the command line - and ideally specify the destination?
5
Installation and Upgrades / Send email from the command line
« on: March 21, 2014, 12:30:34 pm »
I'm running a cron script which I want to email the results from. Normally I'd install eg mailutils and just use the 'mail' command.
Is this OK to do on a Zentyal install - I don't want to tread on the toes of Zentyal's own MTA etc (I'm not using groupware - just the standard mail server) - and/or is there a built in way to do a very simple mail send from the command line with what's installed in Zentyal?
Is this OK to do on a Zentyal install - I don't want to tread on the toes of Zentyal's own MTA etc (I'm not using groupware - just the standard mail server) - and/or is there a built in way to do a very simple mail send from the command line with what's installed in Zentyal?
6
Installation and Upgrades / Re: 3.3 upgrade - dovecot allows any password from localhost (eg webmail)
« on: January 06, 2014, 11:33:47 am »The static passdb option with nopassword=y should only be depending on openchange module installation. If there is no Microsoft Exchange Server compatible server in the picture, there should indeed be no need for this parameter. We will fix this soon.
cool
Likewise, cool Many thanks for the replies on this; it's good to know there is a reason for this change, and specifically that it will be made dependent on a module - some of us don't have Windows clients (or am I the only one?) so don't really need to get involved with exchange
This is a big problem since by default the security at least should be set to use password from ldap.
I'll have to disable the roundcube service for now until this is solved, so nobody should gain access to users mailbox by just typing a random text
Bogdan
Bogdan, this can easily be fixed. You can:
- Comment it out in /usr/share/zentyal/stubs/mail/dovecot.conf.mas and restart mail service; although note you may have to do this again after updating Zentyal
- Or, as Julien suggested, if you change your RC server address from localhost to the actual IP address of the server machine (eg 192.168.0.100 in my case) that should resolve it.
However, it is definitely a gotcha and for now possibly deserves a sticky or something?
As an aside, I actually came across this while switching from RC to Horde. It's a very impressive bit of groupware, very configurable - a bit fiddly to set up the various bits with Zentyal but I've got it working if anyone needs help...
7
Installation and Upgrades / 3.3 upgrade - dovecot allows any password from localhost (eg webmail)
« on: January 05, 2014, 05:14:33 pm »
Just recently upgraded to 3.2 (which broke my smb) then to 3.3 (which loosely fixed it - will try to figure out how/why and post elsewhere). I just discovered that in webmail (I have a separate Roundcube installed, not the Zentyal one) that you could log in with any password to any user account. Not ideal!
Traced it to: /usr/share/zentyal/stubs/mail/dovecot.conf.mas - which contains this:
This seems to do, well, exactly that - allow any password when connecting from localhost (ie using webmail). I commented out this section and that seems to fix it. Looking at git, this arrived in 3.2... although I can't imagine why. Am I missing something - is this deliberate, or a bug?
Traced it to: /usr/share/zentyal/stubs/mail/dovecot.conf.mas - which contains this:
Code: [Select]
passdb {
driver = static
args = nopassword=y allow_nets=127.0.0.1/32
}
This seems to do, well, exactly that - allow any password when connecting from localhost (ie using webmail). I commented out this section and that seems to fix it. Looking at git, this arrived in 3.2... although I can't imagine why. Am I missing something - is this deliberate, or a bug?
8
Installation and Upgrades / Re: Zentyal dashboard slow and unresponsive [SOLVED]
« on: April 05, 2013, 08:40:10 am »
I concur that it seems to be a Chrome issue - as I'm a web developer, am feeling a bit sheepish about not having thought of it! But this is the first time I've ever seen anything that specifically doesn't like Chrome. I tried:
* Remotely, over the internet through a firewall: Chrome, Chrome Incognito (to rule out any cache/cookie issues), Firefox, IE10
* Locally, VNCing into a machine on the same network: Chrome & Safari
It seems to be specifically Chrome over the internet; other combinations work. My internet connection is relatively quick, but still slower than the LAN, so maybe it's the speed; or possibly a going-through-a-firewall issue. Symptoms:
* Initial login screen loads quickly
* Then when logging in, following dashboard page is very slow; browser times out either completely, or shows partial page with no CSS
* Manually changing the URL to another page in Zentyal sometimes makes it catch up; sometimes not
Interestingly, when using Safari, the login screen warns me that I should be using Firefox as it's the only officially supported browser. I don't see this warning in Chrome or IE.
* Remotely, over the internet through a firewall: Chrome, Chrome Incognito (to rule out any cache/cookie issues), Firefox, IE10
* Locally, VNCing into a machine on the same network: Chrome & Safari
It seems to be specifically Chrome over the internet; other combinations work. My internet connection is relatively quick, but still slower than the LAN, so maybe it's the speed; or possibly a going-through-a-firewall issue. Symptoms:
* Initial login screen loads quickly
* Then when logging in, following dashboard page is very slow; browser times out either completely, or shows partial page with no CSS
* Manually changing the URL to another page in Zentyal sometimes makes it catch up; sometimes not
Interestingly, when using Safari, the login screen warns me that I should be using Firefox as it's the only officially supported browser. I don't see this warning in Chrome or IE.
9
Installation and Upgrades / Re: Zentyal dashboard slow and unresponsive [SOLVED]
« on: April 04, 2013, 04:59:44 pm »Just want to point out that it's not a universal experience. Over the years and across versions the "slow GUI" problem has popped up from time to time, but since not everybody experiences it, to my recollection no one has ever established a definitive cause.
Both good and annoying to know it's not everyone I have almost the exact same experience as fatbob - other than that I am not VPNing, only connecting in remotely. Everything else is quick - FTP/HTTP/SSH etc.
I suspect the issue may have something to do with the automatic refreshing that takes place on that page.
It could be - but once I'm in, the dashboard seems to work fine - I think you said the same?
Oh well - it's not a disaster and Zentyal is still awesome stuff which has saved me a lot of time But if we could figure it out, it would be even better - I'll tinker a bit and report back!
10
Installation and Upgrades / Re: Zentyal dashboard slow and unresponsive [SOLVED]
« on: April 04, 2013, 10:23:41 am »If you are having sluggish server issues it is time to consult the command prompt to get to the bottom of things. On a command prompt use the top command to get a sense of which processes are hogging CPU.
Thanks for the reply. The weird thing is that I have used top and nothing is hogging the CPU - my system load is low, eg 0.2, and even while waiting for the dashboard to load, nothing reports a high CPU use.
Unlike fatbob, I'm not connecting via a VPN, but over the internet; I have a (hardware) firewall allowing the relevant port through. But I have seen the issue even when connecting locally. And like fatbob, if I manually try another URL in the web GUI, it usually catches up; after which it is quick - even the dashboard.
So It's not a disaster - just annoying. But thanks for letting me know how to restart the web interface - next time I will give that a go!
11
Installation and Upgrades / Re: How to stop/forward queries for hosts on same domain
« on: April 03, 2013, 06:18:28 pm »Unless I don't understand something, your web server is not listening at domain.com
this service is running on server that has, for sure, well defined host name. This said, one can configure web server (e.g. Apache) to answer to any request, kind of "catch all" mechanism: even if you don't ask for www.domain.com, then server will answer with www.domain.com (this works if you ask for domain.com)
but all these mechanisms are, somewhat, special implementations
Aha, good point. My main web server has an A record (to itself) for mydomain.com; and a CNAME for www.mydomain.com - so the relevant vhost responds to either. However, I have set up my vhost to always redirect to mydomain.com rather than www.mydomain.com - I think it's neater, a la twitter etc.
BTW, I don't understand what:QuoteI changed the IP address of the core domainmeans
That was the tricky bit. In Zentyal > Infrastructure > DNS, I have one domain, mydomain.com
When I click Domain IP addresses, I see the IP address of my server (eg 192.168.0.100) and when I click Hostnames, there is one entry, 'office', with the same IP address.
In this setup, mydomain.com - just on its own - would resolve to the internal IP of the server, preventing me from accessing my website from it. So I kept the internal IP assigned to office.mydomain.com. but clicked Domain IP addresses to change the IP of mydomain.com to that of my public webserver. It seems that depending on what other changes you make in DNS, Zentyal wants to reset this back to the address of the machine - but I got it to stick and it seems to work so far
12
Installation and Upgrades / Re: Zentyal dashboard slow and unresponsive [unsolved...]
« on: April 03, 2013, 05:52:09 pm »
Did that definitely solve the problem? I'm getting the same issue but I don't have the server registered on Zentyal (and don't even have the cloud client module installed).
Sometimes it takes eg a minute to log in - my browser generally times out. During which time, other services - mail, web, ssh, etc, are all working as expected. Once I get in, then it tends to be quick again. Sometimes if it won't log in, specifying a further URL, eg /Network/Diag will kick it into action. But it is getting annoying!
Are there any config parameters we can change on the dashboard service? Or is there a way of restarting it if it gets bogged down?
Sometimes it takes eg a minute to log in - my browser generally times out. During which time, other services - mail, web, ssh, etc, are all working as expected. Once I get in, then it tends to be quick again. Sometimes if it won't log in, specifying a further URL, eg /Network/Diag will kick it into action. But it is getting annoying!
Are there any config parameters we can change on the dashboard service? Or is there a way of restarting it if it gets bogged down?
13
Installation and Upgrades / Re: How to stop/forward queries for hosts on same domain
« on: April 03, 2013, 05:48:25 pm »My current setup is implementing same design and I do not face any issue (meaning yes it works )
what you have to do is to define, in Zentyal DNS, A records and CNAME for external servers, that's it.
Hi Christian - thanks again for your reply. I thought what I was doing was OK - I did the same on my previous Mac server but I guess it doesn't treat DNS the same way so I didn't have this problem. I can't replicate the existing setup exactly as I'd like - but I've got it so it works. The tricky one was my website which is just domain.com as opposed to www.domain.com - I changed the IP address of the core domain but it kept resetting to the internal IP of the machine - but I got it to stick after a few goes!
14
Installation and Upgrades / How to stop/forward queries for hosts on same domain
« on: April 03, 2013, 01:54:09 pm »
I have a public webserver, www.mydomain.com, which serves DNS for the domain mydomain.com. That all works fine. I have set up my zentyal server - to serve mail, smb, etc, on my internal network as office.mydomain.com (host office on domain mydomain.com). I don't particularly need DNS services on it, but the other services require it.
Problem is now that my Zentyal server cannot resolve eg www.mydomain.com and news.mydomain.com - it claims ownership of mydomain.com and because these hosts are not set in it's own DNS, it cannot resolve them. My DNS records are a little tricky to replicate on Zentyal, so I would ideally like it to forward requests to eg my internal router, which will handle searching elsewhere for them.
Think I might have planned wrong here somewhere by using mydomain.com as the domain of my computer :| But any ideas much appreciated...
Problem is now that my Zentyal server cannot resolve eg www.mydomain.com and news.mydomain.com - it claims ownership of mydomain.com and because these hosts are not set in it's own DNS, it cannot resolve them. My DNS records are a little tricky to replicate on Zentyal, so I would ideally like it to forward requests to eg my internal router, which will handle searching elsewhere for them.
Think I might have planned wrong here somewhere by using mydomain.com as the domain of my computer :| But any ideas much appreciated...
15
Installation and Upgrades / Re: Safest way to add FTP support for one user
« on: April 01, 2013, 10:16:43 am »Does the remote server have a static IP? Or is the connection between the two servers via VPN? I'm wondering if you can restrict access at the firewall level.
Good point - it does have a static IP. But I don't particularly want my users to be able to FTP from local addresses; and also I think PAM grants them SSH access - which I can't restrict so easily in the firewall. But it may be the best way!