tar command example for backup file

Started by PG Bug reporting formover 3 years ago1 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/15/backup-file.html
Description:

It would be nice to change the tar command example to:
tar -cf backup.tar -C /usr/local/pgsql/data .
instead.

Otherwise, the /usr/local/pgsql path gets stored in the tar archive which
can be annoying to extract to another location (especially since not all
versions of tar support the newer --strip-components parameter).