Skip to content

Files pertaining to the FreshPorts database, PostgreSQL - copy

Notifications You must be signed in to change notification settings

FreshPorts/databases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

This repo contains the upgrade instructions to take a production FreshPorts database and convert it to use git.

The original instructions are at https://news.freshports.org/2021/01/01/git-database-upgrade-process/

This is the short version of that.

  1. On the source server:

    pg_dump -Fc freshports.org -f freshports.org.dump
    
  2. on the destination server:

    sudo su -l postgres
    createdb -O postgres -T template0 -E SQL_ASCII freshports.prod
    pg_restore -j 20 --no-owner -d freshports.prod freshports.org.dump 
    
  3. After restore:

    begin;
    revoke all PRIVILEGES ON all tables in schema pg_catalog from rsyncer;
    create extension pgcrypto      from unpackaged;
    create extension fuzzystrmatch from unpackaged;
    create extension plperl        from unpackaged;
    

Then commit if all OK.

  1. Update schema etc

    begin;
    \i updates-2020-12-git-changes.ddl
    \i updates-2020-12-git-changes.sql
    \i updates-2021-02-git-changes.ddl
    \i updates-2021-02.27-git-changes.ddl
    

Then commit if all OK.

  1. Adjust datatypes, relational integrity, and functions

    begin;
    \i datatype.txt
    \i ri.txt
    \i sp.txt
    

Then commit if all OK.

About

Files pertaining to the FreshPorts database, PostgreSQL - copy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published