Hi,
1)
list database directory
2)
You don't have permissions on /opt/database! Choose another directory.
You want to take an offline backup of the database, but you are connected to the database. Make sure that the database is not active (DB should not be listet in "list active databases")