why rsync command to postgres upgrade replica are duplicating data folder size increasing disc space

265 Views Asked by At

I'm following this doc https://www.postgresql.org/docs/current/pgupgrade.html to upgrade my cluster postgres an its replica, but when I run the rsync command, it duplicate the data folder, consuming all the disk space crashing the rsync. Here is the rsync command "rsync --archive --delete --hard-links --size-only --no-inc-recursive old_cluster new_cluster remote_dir". Any thoughts?

1

There are 1 best solutions below

1
argdenis On

The problem was the alignment of directories, due to the difference between origin and destination it ended up getting lost and copying everything. well succeeded command: "rsync --exclude pg_wal --archive --delete --hard-links --size-only --no-inc-recursive /pgdata/homologacao/11 /pgdata/homologacao/14 hom-replica:/pgdata/homologacao"