[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] Problems restoring database on Mac - unsupported 'chown'
From: |
Busser, Jim |
Subject: |
[Gnumed-devel] Problems restoring database on Mac - unsupported 'chown' option -c |
Date: |
Wed, 6 Nov 2013 09:04:16 +0000 |
'chown' on Mac does not support -c and therefore line 109 of
gm-restore_database.sh
# need to give postgres appropropriate permissions
chown -c postgres ${BACKUP}-*.sql
fails on Mac, as illustrated by these lines:
==> Unpacking backup file ...
=> Extracting (from tarball) ...
x
backup-gnumed_v18-GNUmed_Team-MacBook-2.local-2013-08-09-23-01-05-database.sql
x
backup-gnumed_v18-GNUmed_Team-MacBook-2.local-2013-08-09-23-01-05-roles.sql
chown: illegal option -- c
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
Mind you, since I had run gm-restore_database.sh as root, the working copy of
the backup file ended up remaining owned by root (whether or not that was
important to success, I am not sure) and so when the password (for postgres)
was then four times requested:
==> Checking target database status ...
Password:
==> Restoring GNUmed roles ...
Password:
==> Restoring GNUmed database gnumed_v18 ...
Password:
==> Analyzing database gnumed_v18 ...
Password:
I seem to have escaped a problem. However since the working directory will only
contain 2 files any way, can
chown -c
be made
chown -v
??
-- Jim
- [Gnumed-devel] Problems restoring database on Mac - unsupported 'chown' option -c,
Busser, Jim <=