Search Postgresql Archives

Re: How to move a 11.4 cluster to another Linux host, but empty?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux