--- Begin Message ---
> On Aug 5, 2016, at 7:05 AM, Martin Petersson <[email protected]> wrote:
> 
> Hello, 
> 
> I need to backup or dump the database to a .bak file, it´s Request Tracker 
> 4.0.7.
> Frits i tried this:
> root@rt:~# pg_dump rtdb > rtdb-backup
> pg_dump: [archove (db)] connection against database "rtdb" failed: FATAL:  
> role "root" does not exist
> 

this is postgres permission error 


> Then i tried:
> root@rt:~# su postgres 
> postgres@rt:/root$ pg_dump rtdb > rtdb-backup
> bash: rtdb-backup: Access denied
> 

this is file local host file system permission error. 


> What do i have to do to create a backup of the database?
> 
> 


you can use the -U and -p flags to specify username and password to pg_dump  so 
you don't need to worry about the su / sudo stuff 


cd /tmp 
pg_dump -U postgres rtdb > rtdb-backup

If your db required a password then you can specify the -p flag such as..

pg_dump -U postgres -p rtdb > rtdb-backup

and it will prompt you for it. 


-Patrick

--
Patrick Muldoon
Network/Software Engineer
INOC (http://www.inoc.net)

RAM DISK is not an installation procedure!


--- End Message ---
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016

Reply via email to