Giter VIP home page Giter VIP logo

Comments (4)

GaPhi avatar GaPhi commented on July 19, 2024

After restoration, I launched the following command to remove the warning:

docker exec -i teslamate-db psql -U teslamate <<<"ALTER DATABASE teslamate REFRESH COLLATION VERSION"

from teslamate.

JakobLichterfeld avatar JakobLichterfeld commented on July 19, 2024

Can you please share your restore steps in detail? As https://docs.teslamate.org/docs/maintenance/backup_restore should cover the migration

from teslamate.

GaPhi avatar GaPhi commented on July 19, 2024

Backup achieved with:

docker exec teslamate-db pg_dump -U teslamate teslamate | gzip --rsyncable - >teslamate-database.sql.gz

Restoration with:

docker exec -i teslamate-db psql -U teslamate <<EOF
 drop schema public cascade;
 create schema public;
 create extension cube;
 create extension earthdistance;
 CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)
      RETURNS public.earth
      LANGUAGE SQL
      IMMUTABLE STRICT
      PARALLEL SAFE
      AS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians(\$1))*cos(radians(\$2))),public.earth()*cos(radians(\$1))*sin(radians(\$2))),public.earth()*sin(radians(\$1)))::public.earth';
EOF
zcat teslamate-database.sql.gz | docker exec -i teslamate-db psql -U teslamate

# Now with this additional step
docker exec -i teslamate-db psql -U teslamate <<<"ALTER DATABASE teslamate REFRESH COLLATION VERSION"        

from teslamate.

JakobLichterfeld avatar JakobLichterfeld commented on July 19, 2024

Thanks a lot!

So we need to include the Collation version in the migration. Thanks for your research!

from teslamate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.