Monday, September 14, 2020

postgres database backup

postgres database backup

We can make backup for postgres database backup by many ways 

  • from the browser by opening the database manager , and click to backup the database that we want to make a backup for as in the image bellow
 
 

  • pgadmin

connecting to the database server as bellow 


then go to the database that you want to make backup for , and right click and then select backup from the menu as in the image bellow 


then you have to define the name for the backup file and the folder which will contain it, and the other information as in the image bellow and then click on the backup button


  • Also we can make database backup from the terminal by writing these commands 
      su - postgres /// to login as postgres user 
      pg_dump dbname > dbname.bak /// to make backup to your database with the name "dbnam" , 
      so don't forget to right the right name of your database 
      psql -f infile postgres ///  to make resulting dump can be restored with psql 
 
#hope this is useful :) 

No comments:

Post a Comment

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...