From: Mark Guertin <markguertin@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: pg_basebackup: errors on macOS on directories with ".DS_Store" files
Date: Wed, 19 Apr 2023 11:45:51 -0400
Message-ID: <E258CE50-AB0E-455D-8AAD-BB4FE8F882FB@gmail.com> (raw)
pg_basebackup: error: backup failed: ERROR: invalid segment number 0 in file ".DS_Store"
This one is pretty self explanatory. When running pg_basebackup on macOS it should probably be ignoring any .DS_Store files found inside data directories instead of transferring/processing them.
Steps to reproduce:
- on a macOS based pg server open a directory containing pg data files and set any kind of view options or move an icon
- this can also happen with inheritance, so even if you do not directly set these kinds of options on data folders, for example if a parent folder has a view option set when a new folder is created it can inherit the same view options, or if spotlight search sets up some metadata this .DS_Store may also be created
My workaround was to manually delete all of the .DS_Store files that the OS created and then immediately run pb_basebackup using the following method:
find <dir> -iname .DS_Store -exec rm {} \;
Some background on .DS_Store files:
https://en.wikipedia.org/wiki/.DS_Store=
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: markguertin@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files
In-Reply-To: <E258CE50-AB0E-455D-8AAD-BB4FE8F882FB@gmail.com>
* 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