Обсуждение: [ADMIN] pg_dump and pg_restore to dropbox

Поиск
Список
Период
Сортировка

[ADMIN] pg_dump and pg_restore to dropbox

От
Andrea Bonomelli
Дата:
Hi all

I've been trying to dump and restore a database to a folder located on dropbox on a mac sierra.

Commands works fine over an internal hdd but not via an external one.

DUMP OK
sudo PGUSER="postgres" PGPASSWORD="xxx" /Library/PostgreSQL/9.5/pgAdmin3.app/Contents/SharedSupport/pg_dump --format=c okay_db_3 > '/Volumes/1TB/databasebackutest2.backup' 

DUMP BAD
sudo PGUSER="postgres" PGPASSWORD="xxx" /Library/PostgreSQL/9.5/pgAdmin3.app/Contents/SharedSupport/pg_dump --format=c okay_db_3 > '/Volumes/Promise\ Pegasus/Dropbox\ \(Okay\ place\)/OkayPost/_RESOLVEBACKUP/db3 /test2.backup' 

-bash: /Volumes/Promise\ Pegasus/Dropbox\ \(Okay\ place\)/OkayPost/_RESOLVEBACKUP/db3 /test2.backup: No such file or directory

what am I doing wrong?




--


Andrea Bonomelli

OKAY STUDIO


+44 207 127 0764


okaystudio.co.uk / twitter facebook


This transmission is confidential and may be privileged.  It is for use by the addressee(s) only. If you are not the addressee or if this email is sent to you in error, please let us know by return to info@okaystudio.co.uk and delete the message from your system.  No contract may be concluded on behalf of Okay Studio email. Okay Studio reserves the right to monitor e-mail communication through its network.

Re: [ADMIN] pg_dump and pg_restore to dropbox

От
"David G. Johnston"
Дата:
On Thu, Aug 17, 2017 at 8:48 AM, Andrea Bonomelli <andrea@okaystudio.co.uk> wrote:

​D​
UMP BAD
sudo PGUSER="postgres" PGPASSWORD="xxx" /Library/PostgreSQL/9.5/pgAdmin3.app/Contents/SharedSupport/pg_dump --format=c okay_db_3 > '/Volumes/Promise\ Pegasus/Dropbox\ \(Okay\ place\)/OkayPost/_RESOLVEBACKUP/db3 /test2.backup' 

-bash: /Volumes/Promise\ Pegasus/Dropbox\ \(Okay\ place\)/OkayPost/_RESOLVEBACKUP/db3 /test2.backup: No such file or directory

what am I doing wrong

​?

​I would suspect the problem is with escaping the spaces and parens in your file name while simultaneously quoting the entire path.

David J.