I need to backup the current db while logged into odoo. I should be able to do it using a button, so that suppose I click on the button, it works the same way as odoo defaul
Go to your_odoo_instance/web/database/manager where you can see all your installed databases:
Odoo's Database Manager - Backup
You will need your defined master password for this task. If you can't remember it, have a look at your odoo.conf file in your server and check the 'admin_passwd' entry.