[SOLVED] Yet Another Backup Script for Community Version
[SOLVED] Yet Another Backup Script for Community Version
Hi John!
this is nothing serious... only a version difference between the ssh-keygen application on ubuntu 6.06 and 7.10.
On 7.10 ssh-keygen by default creates a RSA2 key whereas on 6.06 it still wants the user to decide between RSA1, DSA or RSA2.
I would go with the option rsa or dsa, but not with rsa1.
the script has been updated with this option added to the #--- SSH REMOTE DR COPY ---# section.
The answer to your question "will my backup file be copied to my remote backup server ?" when we have the ssh key generated and copied to the remote host and you have the DR COPY option set to yes. It will 'copy' the newly created archive and the corresponding md5 file to your remote server.
heinzg
P.S. I found another small bug in this part of the script (yes I fixed it...) Cheers
this is nothing serious... only a version difference between the ssh-keygen application on ubuntu 6.06 and 7.10.
On 7.10 ssh-keygen by default creates a RSA2 key whereas on 6.06 it still wants the user to decide between RSA1, DSA or RSA2.
I would go with the option rsa or dsa, but not with rsa1.
the script has been updated with this option added to the #--- SSH REMOTE DR COPY ---# section.
The answer to your question "will my backup file be copied to my remote backup server ?" when we have the ssh key generated and copied to the remote host and you have the DR COPY option set to yes. It will 'copy' the newly created archive and the corresponding md5 file to your remote server.
heinzg
P.S. I found another small bug in this part of the script (yes I fixed it...) Cheers
[SOLVED] Yet Another Backup Script for Community Version
Heinzg,
Thanks for the update. But where can I find the new script. When I look in WIKI I don't see any changes to the script!!!
Greets
John
Thanks for the update. But where can I find the new script. When I look in WIKI I don't see any changes to the script!!!
Greets
John
[SOLVED] Yet Another Backup Script for Community Version
[quote user="jayel"]Heinzg,
Thanks for the update. But where can I find the new script. When I look in WIKI I don't see any changes to the script!!![/QUOTE]There's a link to the current working version in the first post on this thread, hasn't that been updated?
Thanks for the update. But where can I find the new script. When I look in WIKI I don't see any changes to the script!!![/QUOTE]There's a link to the current working version in the first post on this thread, hasn't that been updated?
[SOLVED] Yet Another Backup Script for Community Version
No Bill,
The script is still the same : ssh-keygen (with no paramaters).
Greets
John
The script is still the same : ssh-keygen (with no paramaters).
Greets
John
[SOLVED] Yet Another Backup Script for Community Version
[quote user="jayel"]No Bill,
The script is still the same : ssh-keygen (with no paramaters).
Greets
John[/QUOTE]Ah OK, I guess Heinzg will get round to it - good script isn't it?
The script is still the same : ssh-keygen (with no paramaters).
Greets
John[/QUOTE]Ah OK, I guess Heinzg will get round to it - good script isn't it?
[SOLVED] Yet Another Backup Script for Community Version
Yes,
I like automatic scripts like that. last sunday my mailserver didn't work anymore after a upgrade, and my backup was not completed. So now I want a script that makes a backup on a remote disk.
And Heinz had the solution.
Indeed very nice scripting
greets John
I like automatic scripts like that. last sunday my mailserver didn't work anymore after a upgrade, and my backup was not completed. So now I want a script that makes a backup on a remote disk.
And Heinz had the solution.
Indeed very nice scripting
greets John
[SOLVED] Yet Another Backup Script for Community Version
[quote user="jayel"]Yes,
I like automatic scripts like that. last sunday my mailserver didn't work anymore after a upgrade, and my backup was not completed. So now I want a script that makes a backup on a remote disk.
And Heinz had the solution.
Indeed very nice scripting
greets John[/QUOTE]You should find that your NE backup runs fine now that you've upgraded the RAM on your server. I'd suggest you use those for backup as they will give you more flexibility, if you still have problems with your backup routines then please file a support case so we can look at what's happening.
I like automatic scripts like that. last sunday my mailserver didn't work anymore after a upgrade, and my backup was not completed. So now I want a script that makes a backup on a remote disk.
And Heinz had the solution.
Indeed very nice scripting
greets John[/QUOTE]You should find that your NE backup runs fine now that you've upgraded the RAM on your server. I'd suggest you use those for backup as they will give you more flexibility, if you still have problems with your backup routines then please file a support case so we can look at what's happening.
[SOLVED] Yet Another Backup Script for Community Version
Hi!
I have checked the download link and the current script there.
I have also updated the wiki page, it now shows the latest script.
P.S. I would like to put a link on the wiki page to the script download, but I am hit with the old SPAM rule. Can a wiki admin please add the link??
Here is a direct link to it http://www.osoffice.biz/downloads/zmbac.sh.gz"]-> LINK
Cheers
heinzg
I have checked the download link and the current script there.
I have also updated the wiki page, it now shows the latest script.
P.S. I would like to put a link on the wiki page to the script download, but I am hit with the old SPAM rule. Can a wiki admin please add the link??
Here is a direct link to it http://www.osoffice.biz/downloads/zmbac.sh.gz"]-> LINK
Cheers
heinzg
[SOLVED] Yet Another Backup Script for Community Version
Hi,
Thanks for the script!
Just one comment: If the script is not run with the log redirection anytime then the log file is empty always and then the mail feature fails because the cat $LOG string is missing.
Also mailing fails if the $EMAILCC field is empty. (since -c -s)
Cheers.
R.
Thanks for the script!
Just one comment: If the script is not run with the log redirection anytime then the log file is empty always and then the mail feature fails because the cat $LOG string is missing.
Also mailing fails if the $EMAILCC field is empty. (since -c -s)
Cheers.
R.
-
- Posts: 25
- Joined: Fri Sep 12, 2014 11:28 pm
[SOLVED] Yet Another Backup Script for Community Version
[quote user="Raiky"]
Just one comment: If the script is not run with the log redirection anytime then the log file is empty always and then the mail feature fails because the cat $LOG string is missing. Also mailing fails if the $EMAILCC field is empty. (since -c -s)
R.[/QUOTE]
I'm having a couple of minor problems getting the script working 100% on a CentOS 5.x server and i'm wondering if this is what I'm seeing? (although I don't fully understand the above statement). I get the following error at the end of a FULL backup when the backup log is mailed.
the following is visible in the shell:
./zmbac.sh: line 901: /opt/zimbra-backup-current/Backuplist-21-April-2008.txt.gz: Permission denied
I *do* get an email from root with the log attached. In the email I get an additional line of information:
/opt/zmbac.sh: line 901: /opt/zimbra-backup-dar/Backuplist-21-April-2008.txt.gz: Permission denied
/usr/sbin/sendmail: No such file or directory
Line 901 in the script (copied verbatim off the osoffice website) is:
(cat $LOG; $UUENCODE "$ARCHIVEDIR"Backuplist-"$BACKUPDATE".txt.gz "$ARCHIVEDIR"Backuplist-"$BACKUPDATE".txt.gz) | mail -c $EMAILCC
-s "Zimbra Full Backup Log on `hostname --fqdn`" $EMAIL
I've done some limited experimentation. In my filesystem I've linked /usr/bin/sendmail to /opt/zimbra/postfix/sbin/sendmail .. but it makes no difference. I've also removed/reinstalled the mailx package using Yum and I've tried altering ownership of /bin/mail from root:mail to root:root and giving it 755 permissions:
[root@zim opt]# whereis mail
mail: /bin/mail /etc/mail.rc /etc/mail /usr/lib/mail.tildehelp /usr/lib/mail.help /usr/share/man/man1/mail.1.gz
[root@zim zimbra-backup-current]# ls -l /bin/mail
-rwxr-xr-x 1 root root 82996 Jan 7 2007 /bin/mail
but still it chucks the error..
Any ideas? .. the script is otherwise awesome and I'm planning to use it to back up my Zimbra OSE installation to an NFS mounted location so the data is automatically stored off-box without the complication of an SCP transfer.
Christian
ps: I'd also like to make the following script enhancement suggestions:
a) Email confirmation of successful DIFF backup, at the moment this is only done for FULL backups
b) Option to specify the number of weeks to keep FULL backups in the TOO_MEDIA_DIR to prevent filling the backup-target filesystem
Just one comment: If the script is not run with the log redirection anytime then the log file is empty always and then the mail feature fails because the cat $LOG string is missing. Also mailing fails if the $EMAILCC field is empty. (since -c -s)
R.[/QUOTE]
I'm having a couple of minor problems getting the script working 100% on a CentOS 5.x server and i'm wondering if this is what I'm seeing? (although I don't fully understand the above statement). I get the following error at the end of a FULL backup when the backup log is mailed.
the following is visible in the shell:
./zmbac.sh: line 901: /opt/zimbra-backup-current/Backuplist-21-April-2008.txt.gz: Permission denied
I *do* get an email from root with the log attached. In the email I get an additional line of information:
/opt/zmbac.sh: line 901: /opt/zimbra-backup-dar/Backuplist-21-April-2008.txt.gz: Permission denied
/usr/sbin/sendmail: No such file or directory
Line 901 in the script (copied verbatim off the osoffice website) is:
(cat $LOG; $UUENCODE "$ARCHIVEDIR"Backuplist-"$BACKUPDATE".txt.gz "$ARCHIVEDIR"Backuplist-"$BACKUPDATE".txt.gz) | mail -c $EMAILCC
-s "Zimbra Full Backup Log on `hostname --fqdn`" $EMAIL
I've done some limited experimentation. In my filesystem I've linked /usr/bin/sendmail to /opt/zimbra/postfix/sbin/sendmail .. but it makes no difference. I've also removed/reinstalled the mailx package using Yum and I've tried altering ownership of /bin/mail from root:mail to root:root and giving it 755 permissions:
[root@zim opt]# whereis mail
mail: /bin/mail /etc/mail.rc /etc/mail /usr/lib/mail.tildehelp /usr/lib/mail.help /usr/share/man/man1/mail.1.gz
[root@zim zimbra-backup-current]# ls -l /bin/mail
-rwxr-xr-x 1 root root 82996 Jan 7 2007 /bin/mail
but still it chucks the error..
Any ideas? .. the script is otherwise awesome and I'm planning to use it to back up my Zimbra OSE installation to an NFS mounted location so the data is automatically stored off-box without the complication of an SCP transfer.
Christian
ps: I'd also like to make the following script enhancement suggestions:
a) Email confirmation of successful DIFF backup, at the moment this is only done for FULL backups
b) Option to specify the number of weeks to keep FULL backups in the TOO_MEDIA_DIR to prevent filling the backup-target filesystem