pg_restore error [archiver] unsupported version (1.14) in the file header - postgresql-11

I read a lot of the answers of the topic, but no solution.
>pg_restore --version / pg_restore (PostgreSQL) 11.5
psql --version/ psql (PostgreSQL) 11.5
I have made the backup 2 days ago. I have a similar experience with another machine, but i was trying to restore a file created in version 10 in a version 11 PostgreSQL. In this case, the same one, no updates in these 2 days.
All the posts i have read are from the oldest versions.
I cannot believe this will happen every time we create a backup. Do we need to update everything? do some real solutions were found for this one?
The problem may be with Postgis version? i have installed 3.0.1. and according to postgis support matrix should be ok.
thanks in advance for your help!

Related

Connect to Sybase database from Django

I tried to connect to Sybase database from Django using sqlanydjango, but
I have stuck. One answer saying that
sqlany-django is no longer maintained; it was last updated in May 2016.
What is the other possibility to connect to Sybase database?
OS Ubuntu 18.04
django 2.2.4
Sybase is no longer maintained and it's not supported by Django. I recommend using one of the supported databases:
PostgreSQL
MariaDB
MySQL
Oracle
SQLite
Personally, I would recommend using PostgreSQL - I think it's the most advanced database. If you use it, I would recommend using version 13, since version 14 is still new and I think it's not officially supported by Django yet. It's always a good practice to use the previous major release. Also with Django, I recommend upgrading to the latest major release only about 4 to 6 months after its initial release. So for today, this means using Django 3.2 (latest minor release, currently 3.2.11).
You can use django-environ to define the database you are using in settings.
You could use the freetds module. GitHub repository was active 5 days ago, it aims to provide support for sybase and MSQL Server.
I used it with MSQL
You can download it from there, and installing with the instruction on this link (Sybase python module website)
Then you can test your installation using these steps
You can also try different Django version.
If this doesn't show anything wrong, and Django still won't connect to your DB, you can try to edit Django's source files so the ImproperlyConfigured exception doesn't raise (REALLY REALLY RISKY, DO A BACK UP OF YOUR DB) or migrate your Sybase to a supported database.
You can use pyodbc.
To install this.
Pip install pyodbc
import pyodbc
cnxn = pyodbc.connect(‘DRIVER={Devart ODBC Driver for ASE};Server=myserver;Port=myport;Database=mydatabase;User ID=myuserid;Password=mypassword;String Types=Unicode’)
For reference:-
https://medium.com/#sharma.jayant1992/best-way-to-connect-python-with-sybase-database-76445713efaf

Syncing with S3: Errno 24 too many open files

This is a bit of a head scratcher for me because I've done this same procedure with the same types of documents multiple times. No issues before and the last refresh was as recent as October.
I have project that involves downloading and parsing a large batch of PDFs quarterly. There are about 1.1 million at each release. Each PDF is 3-4 pages so the files are pretty small. I do everything with them locally but then push from the external SSD to S3 once downloaded to have a backup.
I'm currently attempting to refresh. It gets about 50 files in and then I get the error
fatal error: [Errno 24] Too many open files
None of the files are open.
Pretty straightforward but this is what I'm doing in terminal
> screen
> aws s3 sync '/Volumes/G-DRIVE slim SSD USB-C/DOF PDFs/NPV_all' s3://dof.taxdocs/NPV
Does anyone have any thoughts?
Edit:
I tried setting ulimit to 65536/200000 which did not work. I also tried reverting to an earlier AWS CLI 2.X which also did not work. Finally I hooked the external SSD up to my laptop and it's syncing fine from there. On that machine ulimit is set to 256 which tells me that is not the issue. However it is running aws-cli/1.11.28 Python/2.7.10 Darwin/18.7.0 botocore/1.4.85. OS is Mojave 10.14.6 (same as the desktop which is encountering the problem). I strongly suspect this is a bug in the more recent versions of AWS CLI. If anyone else runs into this in the future I would first try the most recent AWS CLI (hopefully no bugs by then) and then revert to a version 1.X.
I dunno if that will count as an answer, but I had similar issue, and fix for me was to upgrade awscli, from:
aws-cli/2.5.8 Python/3.9.12 Darwin/20.6.0 source/x86_64 prompt/off
to:
aws-cli/2.7.3 Python/3.9.13 Darwin/20.6.0 source/x86_64 prompt/off
via brew upgrade awscli
Ensure your awscli is up to date to latest version, eg brew upgrade awscli
Check aws configure get s3.max_concurrent_requests for current limit - maybe you forgot that you've set up in the past (like myself .-.) to something like 200
Set to a sensible value again: aws configure set s3.max_concurrent_requests 10

Can I safely update Apache Superset via pip?

I am currently running an outdated version of Apache Superset 0.20.4. The Superset DB contains a substantial amount of slices and dashboards. I would like to update my version.
Can I just run an upgrade from pip? Is any of you aware of any backward incompatibility that would prevent me from reading the Superset DB after the update?
Answering my own question, there is no problem in upgrading but one has to run the DB migration superset db upgrade.

MAMP Pro - Host database missing

I fired up MAMP Pro this morning and one of my databases is missing.
It's not listed in the Databases list within Mamp Pro and it's not listed within phpMyAdmin either.
I did a few things recently (listed below) that may have contributed to this but
my Question 1 is
Are databases stored as individual .sql files anywhere within my Mac? I don't see anything in /Users/me/Library/Application Support/appsolute that is obviously a sql file. If I knew where to locate this, I could try recover a .sql file with a file recovery software
Things I did that may have caused this
1. I upgraded from Mamp Pro 5.0.1 to 5.0.3 this morning
2. As part of that upgrade I had to run a Tools > Upgrade database
APart from that I can't think what might have happened. Thanks
MAMP PRO has information here on missing databases.
https://appsolute.zendesk.com/hc/en-us/articles/215198946-I-upgraded-to-MAMP-PRO-5-and-I-am-missing-databases-
Your MAMP PRO 4 database most likely did not get copied over.

Upgrade PHP PDO_PGSQL version from 8.4 to 9.4 EC2 Instance

I have an EC2 Amazon Linux Ami instance running PHP server version 5.6.22, also PostgreSQL 9.4.6 installed.
Doing an echo phpinfo(); it give the following value for PDO_PGSQL library:
PostgreSQL(libpq) Version 8.4.20
This is causing that the app server throws error while trying to connect to the RDS instance with Postgres 9.5 due to the missmatching versions.
I have been looking to make that version to be 9.4 or 9.5. Until now, I had done severals reinstall, trying dealing with repositories, but without results.
EDIT:
The reported version for psql command is: psql (PostgreSQL) 9.4.6
Its very old but I wanted to write.
I had the same issue and thought that error caused by php libpq exactly like you.
I tried million times to reinstall everything, changed OS but no result. Then I found some other setting that can cause the error. That was "Security Groups". You can find it under EC2 page menu. Please switch inbound source "everywhere" for "rds-launch-wizard" group then try to connect again.
It should work, if other every options are O.K.
Good luck.