From: | Martin French <Martin(dot)French(at)romaxtech(dot)com> |
---|---|
To: | José Pedro Santos <zpsantos1(at)hotmail(dot)com> |
Cc: | Postgres Ajuda <pgsql-general(at)postgresql(dot)org>, pgsql-general-owner(at)postgresql(dot)org |
Subject: | Re: Dump Database |
Date: | 2014-03-17 13:10:06 |
Message-ID: | OFAED2524E.602F67E7-ON80257C9E.0048358C-80257C9E.00485659@romaxtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
pgsql-general-owner(at)postgresql(dot)org wrote on 17/03/2014 12:50:20:
> From: José Pedro Santos <zpsantos1(at)hotmail(dot)com>
> To: Postgres Ajuda <pgsql-general(at)postgresql(dot)org>,
> Date: 17/03/2014 12:56
> Subject: [GENERAL] Dump Database
> Sent by: pgsql-general-owner(at)postgresql(dot)org
>
> Dear all,
>
> I'm trying to dump my database using the following command after I
> enter as su postgres:
>
> pg_dump - U postgres mydb -f mydb.sql
>
> ... but I'm always having the following message:
>
> pg_dump [archiver] Could not open output file "mydb.sql" : Permission
denied
>
> I try to use the same statement using su.. but I didn't manage. Can
> someone give me a help?
>
> I'm using Ubuntu 12.04 LTS and Postgres 9.1.
>
> Kind Regards,
> José Santos
The assumption here is that you're in a directory where you do not have
permissions.
try:
# cd
# pg_dump -f mydb.sql -U postgres mydb
It also appears that you have a space between "-" and "U", make sure that
it appears: "-U".
Cheers
=============================================
Romax Technology Limited
A limited company registered in England and Wales.
Registered office:
Rutherford House
Nottingham Science and Technology Park
Nottingham
NG7 2PZ
England
Registration Number: 2345696
VAT Number: 526 246 746
Telephone numbers:
+44 (0)115 951 88 00 (main)
For other office locations see:
http://www.romaxtech.com/Contact
=================================
===============
E-mail: info(at)romaxtech(dot)com
Website: www.romaxtech.com
=================================
================
Confidentiality Statement
This transmission is for the addressee only and contains information that
is confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf
of the addressee
you may not copy or use it, or disclose it to anyone else.
If you have received this transmission in error please delete from your
system and contact the sender. Thank you for your cooperation.
=================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis | 2014-03-17 13:14:03 | Re: Dump Database |
Previous Message | José Pedro Santos | 2014-03-17 12:50:20 | Dump Database |