Hi Matthias, > On 01. May, 2020, at 10:10, Matthias Apitz <guru@xxxxxxxxxxx> wrote: > > > Hello, > > I've a 11.4 cluster on a Linux host with 3 production database, all > below /data/postgresql11.4/ (i.e. the cluster itself is > /data/postgresql11.4/data) fully configured an running fine. I want to > move it "cold" (i.e. when it is shutdown) by tar to another host, BUT > without the database (due to PII and GDPR relevant data). Between the > source and target host there is no network. > > Of course I could, after moving all the PostgreSQL software (all is below a top > level directory /usr/local/sisis-pap/pgsql, compiled by me) and setup the > cluster from scratch on the other host, but I wanted to have it all in one shoot by tar. > > Is there a way to exclude the databases from the move by tar, or by some > sophisticated pg_* command? > > Thanks > > matthias you may have a look at the tar man page. tar in Linux has the --exclude=PATTERN option. You may specify the PGDATA directory there. Alternatively you may specify each directory inside the software directory without explicitly specifying subdirectories to include: tar cvf postgresql11.4.tar /data/postgresql11.4/bin /data/postgresql11.4/share ... Also, why do you have the PGDATA directory inside the software home directory? That makes no sense and only leads to problems when updating or, in your case, moving. We use: /data/postgres/xx.x <= with xx.x as PostgreSQL version /data/<some-prefix>/<cluster_name> <= as PGDATA This way, we never have any trouble doing something with the software or database cluster independently from each other. Hope, this helps. Cheers, Paul