Re: Automated Backup Script Help (Linux) - Mailing list pgsql-general

From Andrew Gould
Subject Re: Automated Backup Script Help (Linux)
Date
Msg-id CAFKhKgr5BR=hWrv8MiuVbSGTHyHafcy8xaK7k8SJt+pux7xVFQ@mail.gmail.com
Whole thread Raw
In response to Automated Backup Script Help (Linux)  (Carlos Mennens <carlos.mennens@gmail.com>)
List pgsql-general
On Wed, Mar 7, 2012 at 12:33 PM, Carlos Mennens
<carlos.mennens@gmail.com> wrote:
> I'm trying to get the automated backup scripts to work from:
>
> http://wiki.postgresql.org/wiki/Automated_Backup_on_Linux
>
> Currently I'm using PostgreSQL 9.1.3 and have the following three files:
>
> carlos@db1:~/postgresql$ ls -l
> total 20
> drwxr-xr-x 2 carlos users 4096 Mar  7 13:13 backup
> -rw-r--r-- 1 carlos users 1434 Mar  7 13:19 pg_backup.config
> -rw-r--r-- 1 carlos users 4304 Mar  7 12:54 pg_backup_rotated.sh
> -rw-r--r-- 1 carlos users 3379 Mar  7 12:54 pg_backup.sh
>
> My Linux shell user 'carlos' has rwx to the entire directory as well
> as the database role 'carlos' is listed as a REPLICATION role:
>
> postgres=# \du
>                                     List of roles
>  Role name |                           Attributes
>     | Member of
> -----------+----------------------------------------------------------------+-----------
>  carlos    | Superuser, No inheritance, Create role, Create DB,
> Replication | {it}
>
> Now when I attempt to run the script for the 1st time, I get the
> following error:
>
> carlos@db1:~/postgresql$ pwd
> /home/carlos/postgresql
>
> carlos@db1:~/postgresql$ ls -l
> total 20
> drwxr-xr-x 2 carlos users 4096 Mar  7 13:13 backup
> -rw-r--r-- 1 carlos users 1435 Mar  7 13:25 pg_backup.config
> -rw-r--r-- 1 carlos users 4304 Mar  7 12:54 pg_backup_rotated.sh
> -rw-r--r-- 1 carlos users 3379 Mar  7 12:54 pg_backup.sh
>
> carlos@db1:~/postgresql$ sh pg_backup.sh
> pg_backup.sh: 7: cd: can't cd to pg_backup.sh

Doesn't this mean it's trying to cd to a file instead of a directory?

Andrew

pgsql-general by date:

Previous
From: Nicolas Grilly
Date:
Subject: Re: ts_rank seems very slow (140 ranked documents / second on my machine)
Next
From: Nicolas Grilly
Date:
Subject: Re: Full text search ranking: ordering using index and proximiti ranking with OR queries