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
Then i tried:
root@rt:~# su postgres
postgres@rt:/root$ pg_dump rtdb > rtdb-backup
bash: rtdb-backup: Access denied
What do i have to do to create a backup of the database?
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
Then i tried:
root@rt:~# su postgres
postgres@rt:/root$ pg_dump rtdb > rtdb-backup
bash: rtdb-backup: Access denied
What do i have to do to create a backup of the database?
Use ‘su - postgres’ instead to become postgres instead of just get the permissions of postgres. If that doesn’t work because it doesn’t have a shell try sudo but ultimately you need to be in a place you can write to while having the permissions of postgres or specify the location in the redirect.
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…