Modification in script for postgesql db backup

Job ID: 34084545

Budget: ₹600 – ₹1,500 INR

The script is working fine except it as password of target server(not to ask password target server we have to store the password in script or somewhere else in main server
Schedule script to run auto

variable for dbname so that only change the db name in varibale like $db1Name='db1'
run these command from main server to target server
pkill -9 python
/etc/init.d/postgresql restart
drop the databases from target server before create again
Related categories: Python Linux PostgreSQL