We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you try to restore a /backup/latest* file in non-interactive mode, you get all sorts of errors like this:
invalid command \!7{Oj?VB֓V9kIh[ invalid command \L;Mmٰa<i invalid command \Rkn invalid command \Z,fJDsؘFF6Zp8W J3=:Ez87(0q{]$
This is because the file extension can't be read by decompress_cmd function which leads to
pv ${r_filename} | cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
instead of
pv ${r_filename} | ${decompress_cmd}cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
and restoring a compressed file just fails.
restore /backup/latest-pgsql_gitea_db pgsql db x x x 5432
Restore correctly.
tiredofit/db-backup:4.0.35
One workaround is
restore $(readlink -f /backup/latest-pgsql_gitea_db) pgsql db x x x 5432
In general it would be nice to extend the decompress function, like:
if file is symlink; file=$(readlink $file); done
Also, a cross check would be great, if decompress_cmd has a valid value.
Thanks for your work :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
When you try to restore a /backup/latest* file in non-interactive mode, you get all sorts of errors like this:
This is because the file extension can't be read by decompress_cmd function which leads to
pv ${r_filename} | cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
instead of
pv ${r_filename} | ${decompress_cmd}cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
and restoring a compressed file just fails.
Steps to reproduce
restore /backup/latest-pgsql_gitea_db pgsql db x x x 5432
What is the expected correct behavior?
Restore correctly.
Environment
tiredofit/db-backup:4.0.35
Possible fixes
One workaround is
In general it would be nice to extend the decompress function, like:
if file is symlink; file=$(readlink $file); done
Also, a cross check would be great, if decompress_cmd has a valid value.
Thanks for your work :)
The text was updated successfully, but these errors were encountered: