Closed
Description
Discussed in #156
Originally posted by Thorlake September 2, 2024
Hi guys,
Sorry for bothering
By any chance is there a way to help me?
For version
prodrigestivill/postgres-backup-local:14
and configuration
POSTGRES_EXTRA_OPTS: -Fd -Z9 --schema=public -b
SCHEDULE: 0 12 * * *
BACKUP_KEEP_DAYS: 9
BACKUP_KEEP_WEEKS: 0
BACKUP_KEEP_MONTHS: 3
BACKUP_KEEP_MINS: 0
I got the exception
./backup.sh: line 105: /usr/bin/ln: Argument list too long
I assume the code from https://github.com/prodrigestivill/docker-postgres-backup-local/blob/main/backup.sh#L105
ln -f "${FILE}/"* "${DFILENEW}/"
just links folder /last
to currently created folder. However there are maybe too many files and ln
can't be executed
file name is usually something like
/backups/daily/superuser_db-20240822.sql.gz/3419.dat.gz
/backups/daily/superuser_db-20240822.sql.gz/3420.dat.gz
/backups/daily/superuser_db-20240822.sql.gz/3431.dat.gz
....
What is the best way to fix it?
To fix project code to sth like
for f in "${FILE}"/*; do
ln -f "$f" "${DFILENEW}/"
done
```
same for WFILENEW and MWFILENEW
upd: checked and I do have really a big number of files like `-20240902-100510.sql.gz/blob_17240.dat.gz'`
because number of blob files is huge (with directory custom dump type)
</div>