bggo / Zmbkpose

The zmbkpose tool is a shell script that does hot backup and hot restore of ZCS Opensource accounts, GPL(OPENSOURCE). It can run from any host in the net, which means that it can be set on a backup server already existent.
http://wiki.zimbra.com/wiki/HOT_Backup_and_HOT_Restore
GNU General Public License v3.0
79 stars 56 forks source link

Zmbkpose -f error when try rename archive on end of backup #74

Closed bhillcv closed 6 years ago

bhillcv commented 6 years ago

Hi!.

I'm trying to run the zmbkpose -f command for zimbra backup, but at the end of command the error below appears:

mv: cannot move ‘/media/backup/KNa6’ to ‘/media/backup/full-20180221110326’: Permission denied curl: (6) Couldn't resolve host '' curl: (6) Couldn't resolve host '' du: cannot access ‘/media/backup/full-20180221110326/*’: No such file or directory curl: (6) Couldn't resolve host '' du: cannot access ‘/media/backup/full-20180221110326’: No such file or directory 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

Here is the zmbkpose.conf: BACKUPUSER=zimbra WORKDIR=/media/backup (mount at on windows server partition) ADMINUSER=admin ADMINPASS=xxxxxxxxxxx LDAPMASTERSERVER=ldap://192.168.0.172:389 LDAPZIMBRADN=uid=zimbra,cn=admins,cn=zimbra LDAPZIMBRAPASS=Sn_E9prEvI LOGFILE=/media/backup/backup.log PARALLEL_SUPPORT=1 MAX_PARALLEL_PROCESS=3

Command mount to /backup partition: mount -t cifs -o username=santana,password='xxxxxxxxx',gid=zimbra,uid=zimbra,dir_mode=0777,file_mode=0777,iocharset=utf8 //192.168.10.215/backup/santana /media/backup

Out of command ll on Zimbra server: [zimbra@mail media]$ ll total 0 drwxrwxrwx 2 zimbra zimbra 0 Feb 21 11:03 backup [zimbra@mail media]$

Anybody help me with this error?

Thank you!

enribar commented 6 years ago

curl: (6) Couldn't resolve host ''

It looks like the script is not able to populate the $MAILHOST variable, which is defined and used in zmbkpose script. This variable contains the DNS name or IP address of the zimbra server. If you do not want to debug why it happens, define $MAILHOST in zmbkpose.conf and comment it out in zmbkpose script, e.g. in #MAILHOST=$(grep -A1 ^$MAIL $LISTALLACCOUNTS| grep -v @)

bhillcv commented 6 years ago

Xjobex, thank you for your help.

My problem is not with sending the log, but with the backup done in the remote mapping. It seems the zmbkpose script can not rename the file generated on a remote drive on the network.

mv: cannot move ‘/media/backup/KNa6’ to ‘/media/backup/full-20180221110326’: Permission denied

'

enribar commented 6 years ago

If you try to create and rename a folder in /media/backup as zimbra user, do you receive the same error?

However, it looks like this zmbkpose has not been actively maintained since a lot of years...take a look to #73 , there are some forks or similar projects that are more updated than this one.

bhillcv commented 6 years ago

Xjobe, I (zimbra user) have total permission on the folder. But when zmbkpose run, is error happening when change the folder name to zTemp to full20180308....

enribar commented 6 years ago

Maybe zimbra user does not have the right permission on the containing directory? Take a look at https://unix.stackexchange.com/a/46129

bhillcv commented 6 years ago

Xjobex, thank you for your help.

I'm create a new script for backup of zimbra accounts. And it's work!