Not intending to necro this thread but I'm trying to write a script to take this into account and having a hard time getting the mdb_copy command to work outside of the zimbra user's account. When I try to pass it through via su I get a command not found error.
Originally Posted by gevezex
I also tried
# su -c 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup' zimbra
bash: mdb_copy: command not found
And the /backup directory was chown'd to zimbra:zimbra
# su zimbra 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup'
bash: mdb_copy /opt/zimbra/data/ldap/mdb/db /backup: Permission denied
I tried to find a way to run mdb_copy as root but am only finding it inside of a compressed file
To goal is a script to:
# find / -name mdb_copy
1. /etc/init.d/zimbra stop
2. rsync all except the db to /backup
3. /etc/init.d/zimbra start
4. mdb_copy the db to it's necessary place in /backup
5. Continue on with the rest of the backup procedure.
Any pointers appreciated.