Jump to content

reggiep

Members
  • Posts

    1,570
  • Joined

  • Last visited

Everything posted by reggiep

  1. Can I come back in with my next problem now? I have my script, well webmans with some different paths, and I can execute it by typing "sh zbackup.sh" at the prompt BUT when I do execute it I get a response as follows... : command not found : command not found : command not found : command not found: : command not found: : command not found: : command not found: : command not found: : command not found: 'backup.sh: line 27: syntax error near unexpected token `{ 'backup.sh: line 27: `function out { I'm not sure how I have managed to cock up since it works fine if I paste the text straight in to the prompt! #!/bin/bash # # Zimbra Backup Script # # Variables TIME=`date +%Y-%m-%d` DOWN=`date +%u` DOWD=`date +%A` SOURCE="/opt/zimbra/" DEST="/tmp/zcsbackup" NFSHOST="10.60.28.53" NFSPATH="/Volumes/Promise/zimbra" NFSMOUNT="/mnt/mac-1" ARCHIVENAME="zcsbackup-$DOWN-$DOWD.tar.gz" ARCHIVE="/tmp/$ARCHIVENAME" LOG="/var/log/zmbackup.log" EMAIL="[email protected]" function out { echo "["`date +"%Y-%m-%d %T"`"] $1" } #echo "" #echo "* * * * * * * * * *" #echo "Zimbra backup" #echo `date +%Y-%m-%d` #echo "" echo "" out "Zimbra backup" echo "" echo "" out "Stopping services" echo "" # Stop Zimbra Services su - zimbra -c /opt/zimbra/bin/zmcontrol stop sleep 5 echo "" out "Zimbra status:" echo "" su - zimbra -c /opt/zimbra/bin/zmcontrol status sleep 10 echo "" out "Making directory and executing Rsync" echo "" # Make directory and sync to it mkdir $DEST rsync -aHK --exclude=*.pid $SOURCE $DEST echo "" out "Restarting Zimbra services" echo "" # Restart Zimbra Services su - zimbra -c /opt/zimbra/bin/zmcontrol start sleep 5 echo "" out "Zimbra status:" echo "" su - zimbra -c /opt/zimbra/bin/zmcontrol status echo "" out "Creating archive" echo "" # Create archive of backed-up directory for transfer tar -zcf $ARCHIVE -C $DEST . echo "" out "Copying to NFS server" echo "" mkdir $NFSMOUNT mount -t nfs $NFSHOST:/$NFSPATH $NFSMOUNT cp -fv $ARCHIVE $NFSMOUNT/ ls -lah $NFSMOUNT umount $NFSMOUNT rm -rfv $NFSMOUNT echo "" out "Removing $DEST and $ARCHIVE from local disk" echo "" # Remove temp backup destination, samba and archive rm -rf $DEST rm -fv $ARCHIVE echo "" out "Backup complete!" echo "" echo "----------" cat $LOG | mail -c '' -s "[Zimbra backup] `hostname --fqdn` $TIME" $EMAIL
  2. the sh zbackup.sh worked, well it started the script anyway! Thanks
  3. Ok thanks to webman and others have my Zimbra installation up and running. I can run a number of commands to backup the aforementioned zimbra but I can't save those commands as a script .sh and then run that? I have saved my script as zbackup.sh I then tried runnig it but no go. I have a read round and find I need to chmod it. I tried chmod it like so $ chmod ugo+rx zbackup.sh but I still get this error when I type "zbackup.sh" at the prompt -bash: zbackup.sh: command not found Am I missing an abvious, to linux, step? Thanks
  4. Funny thing just happened in my lonely office so i thought I would share. A new student type teacher came in and was talking about how she was going to create a great project for our VLE and for her course work for (uni?) I let her tick off the list of all the things she was going to do such as interactive quizzes, tests and the like and then asked how should could log on to our moodle. The great bit was when I told her we had uniservity. Her face dropped and even more so when I told her she couldn't do half the things she wanted to. I gave her a log in and wished her luck!
  5. I don't have anything here but moodle.org itself has some great comparison documents.
  6. reggiep

    Backing up zimbra

    @Webman See I told you I don't get linux! It works thanks webman. It was that nfs was not installed. Duh! I now have a backup on my mac server's oversized direct attached storage. Now then time to try to work out cron to automate this task. One question, it is cron I use isn't it?
  7. reggiep

    Backing up zimbra

    Do you have some more info on LVM please? My mail server is just a test at the moment but I am trying to learn as I am going so when the time does come for a move I should know more than i do now, if you see what I mean?
  8. reggiep

    Backing up zimbra

    @Webman I have NFS running on my mac server, as far as I can tell. I used a third party application to set it up and if I browse to /etc/exports I can see that the nfs folder is set up in there? Anyway all the script runs fine until I get to the following... root@email:/tmp/zcsbackup# root@email:/tmp/zcsbackup# mkdir $NFSMOUNT root@email:/tmp/zcsbackup# mount -t nfs $NFSHOST:/$NFSPATH $NFSMOUNT mount: wrong fs type, bad option, bad superblock on 10.60.28.53://Volumes/Promise/zimbra, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program) In some cases useful info is found in syslog - try dmesg | tail or so Like I said before I'm new to NFS so it could be somthing really simple that I have cocked up! @Geoff Rsync? please do tell, I am really a lightweight when it comes to linux and mac, which is unfortunate with us having an expensive mac server setup staring at me out of the server cab.
  9. reggiep

    Backing up zimbra

    @Webman. All the script runs fine with adjustments for my servers BUT my NFSknowledge is letting it down I have set up nfs on a ,mac server as we have a 4TB drive sat doing nothing and thought that would be ideal for the back ups. Can I put my error here for some help? Thanks
  10. reggiep

    Backing up zimbra

    @Webman. Can I ask about part of the script... NFSHOST="bbs-nas-001" NFSPATH="/mnt/vol1/backups/bbs-zcs-001" NFSMOUNT="/mnt/bbs-nas-001" I'm not sure how this bit works! My server is ed-prenton-cs01 which I can see would need to go into the first line. It's the next two lines I'm not sure about. Do I need to create a share called backups on that server?
  11. reggiep

    Backing up zimbra

    Thanks webman, I have very little understanding of linux so this is a great help. I'll have a play with the script now.
  12. reggiep

    Backing up zimbra

    Open source!
  13. Studying in Durham. I thought you would be teaching!!
  14. reggiep

    Backing up zimbra

    I have touched on this briefly in another post BUT I need to clarify it a bit. How do you back up zimbra? Bear in mind that I don't know how to back up anything from a linux/ubuntu box! I have had a squint at a couple of articles in the zimbra forums but wondered if anyone could give me some pointers? Thanks
  15. Thanks guys, I'll have a play with the sharing aspect now I think.
  16. Wahay, I have zimbra running but now I need to work out what to do with it apart from email. Can anyone let me know what else they use? Shared documents, shared calendars? I just want to show the SMT that it is a better alternative to our current online email but want to push the other aspects and learn more about them. Thanks
  17. Just to update. I now have email working. i had the wrong domain in my email addresses! My users were [email protected] when it should have been [email protected]. Also our provider were blocking a few thing which they unblocked over the half term.
  18. I asked them to unblock as much as needed doing last week, I guess something has been missed somewhere. Thanks for all the advice
  19. I can connect through to the address but it will not let an email go through. I get a - 554 relay access denied message - error. I guess i might have set it up right then but need tech support to unblock some bits for me!
  20. In that case I might alrady be talking to one? I am going to an internal address that our LA Tech services has provided along the lines of 10.60.*.* Is that a smarthost? Thanks
  21. Just as I was about to give up for the day, geoff mentions smarthosts? Please explain more? Thanks
  22. Bugger, I'm timing out when trying to connect to relay.embc.uk.com 25. I'm guessing I need to get our Tech services to unblock some things? thanks Kmount
  23. Just to update on the sending emails, I have tried telneting to out LA email server and I get the same error when trying to send to my gmail from that. SO I guess I had better check with them.
  24. Hi Kmount, I am running it on ubuntu server. I can send an email to [email protected] from [email protected] while I am running on our domain. I'm not sure if that email leaves the domain? I cannot email out to external accounts such as my gmail or external school webmail.
  25. I "think" that I have set up everything I need to get my zimbra server to receive emails but it doesn't! I get this error when trying to send to a users email "553 553 sorry, that domain isn't in my list of allowed rcpthosts" I have checked the mx record and that points to the right ip address for the server. I have tried sending to a non existent user on the server and I get a different error so I am assuming it is getting so far but I cannot get any further. Can anyone who has zimbra up and running help at all? Thanks
×
×
  • Create New...