pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Apitz <guru@unixarea.de>
To: Paul Förster <paul.foerster@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
Date: Sat, 2 May 2020 12:23:29 +0200
Message-ID: <20200502102329.GA14178@c720-r342378> (raw)
In-Reply-To: <20200501083148.GA3595@c720-r342378>
References: <20200501081029.GA3261@c720-r342378>
	<999AE92C-F74D-4399-8FE1-1DB80D08915D@gmail.com>
	<20200501083148.GA3595@c720-r342378>

El día viernes, mayo 01, 2020 a las 10:31:48a. m. +0200, Matthias Apitz escribió:

> Hi Paul,
> 
> El día viernes, mayo 01, 2020 a las 10:23:37a. m. +0200, Paul Förster escribió:
> 
> > 
> > you may have a look at the tar man page. tar in Linux has the --exclude=PATTERN option.
> 
> I do know the man page(s) of tar ant the --exclude=PATTERN.
> 
> > You may specify the PGDATA directory there.
> 
> This is, what I wanted to know: that the cluster can be moved without
> the PGDATA dir and still works fine.
> 

This will not work! The cluster was created with:

$ /usr/local/sisis-pap/pgsql/bin/pg_ctl -D /data/prosgresql11/data initdb

and consequently, PGDATA is /data/prosgresql11/data. This directory contains a
lot of subirs and config files:

srap32dxr1:/home/sisis/guru # du -s /data/postgresql11/data/* | sort -n
4       /data/postgresql11/data/PG_VERSION
4       /data/postgresql11/data/pg_commit_ts
4       /data/postgresql11/data/pg_dynshmem
4       /data/postgresql11/data/pg_ident.conf
4       /data/postgresql11/data/pg_replslot
4       /data/postgresql11/data/pg_serial
4       /data/postgresql11/data/pg_snapshots
4       /data/postgresql11/data/pg_stat
4       /data/postgresql11/data/pg_tblspc
4       /data/postgresql11/data/pg_twophase
4       /data/postgresql11/data/postgresql.auto.conf
4       /data/postgresql11/data/postmaster.opts
4       /data/postgresql11/data/postmaster.pid
8       /data/postgresql11/data/pg_hba.conf
12      /data/postgresql11/data/pg_notify
16      /data/postgresql11/data/pg_logical
24      /data/postgresql11/data/postgresql.conf
28      /data/postgresql11/data/pg_multixact
196     /data/postgresql11/data/pg_subtrans
732     /data/postgresql11/data/pg_stat_tmp
940     /data/postgresql11/data/global
1328    /data/postgresql11/data/pg_xact
76076   /data/postgresql11/data/serverlog.20200414
81988   /data/postgresql11/data/pg_wal
90268   /data/postgresql11/data/serverlog
16672568        /data/postgresql11/data/base

The databases (or it least their content) are below /data/postgresql11/data/base
(because of the size of ~81 GByte).

So the question remains: What I have to move by tar to get the cluster
setup on the new host, but without the databases in it?

If this is not possible, I will only copy over the software from /usr/local/sisis-pap/pgsql/
and create the cluster from scratch.

Thanks

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





view thread (15+ messages)  latest in thread

Message-ID: <20200502102329.GA14178@c720-r342378>
Permalink:  ../20200502102329.GA14178@c720-r342378/
Also on:    postgresql.org/message-id/20200502102329.GA14178@c720-r342378

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: guru@unixarea.de, paul.foerster@gmail.com
  Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
  In-Reply-To: <20200502102329.GA14178@c720-r342378>
  References: <20200501081029.GA3261@c720-r342378> <999AE92C-F74D-4399-8FE1-1DB80D08915D@gmail.com> <20200501083148.GA3595@c720-r342378> <20200502102329.GA14178@c720-r342378>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox