GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Defacto2/database: The database for Defacto2, a website conserving defunct software, wares, and elite digital subcultures of the PC.

BranchesTags
Open more actions menu

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
defacto2_ps-create-files.sql
defacto2_ps-create-files.sql
 
 
.gitattributes
.gitattributes
 
 
README.md
README.md
 
 

Repository files navigation

Defacto2, database

The Defacto2 database collects thousands of records documenting the history of the PC Scene and is the data powers the famed Defacto2 website.

There are daily exports of the SQL database.

DOWNLOAD: defacto2.net/sql/files.sql.

PostgreSQL 16+ is recommended for compatibility.

Tip

There is a RESTful API available.
defacto2.net/api.

First time setup

These instructions are for a Linux or macOS environment with a running PostgreSQL application and assumes the postgres username.

  1. Download the SQL export file
  2. Create a new database in your PostgreSQL server
  3. Import the SQL export file into the new database
  4. Test the table creation and data
cd ~

# 1) download the latest SQL file
curl https://defacto2.net/sql/files.sql --output files.sql

# 2) create the database
createdb --username=postgres defacto2_ps

# 3) import the table and the data
psql --username=postgres --dbname=defacto2_ps --file=files.sql

To test the table creation and data.

psql --username=postgres --dbname='defacto2_ps' --command='SELECT COUNT(*) FROM files;'
 count 
-------
  50000
(1 row)

Tip

The count result will depend on the latest export which will not be 50000 exactly.

Update records with the latest data

Download and import the latest SQL file.

cd ~
curl https://defacto2.net/sql/files.sql --output files.sql
psql --username=postgres --dbname=defacto2_ps --file=files.sql

Update a Docker container with the latest data

These instructions are for a Linux or macOS environment with a running a Docker PostgreSQL container with the following assumptions:

  • Container name: pgdb
  • Database name: defacto2_ps
  • Database username: postgres
cd ~

# download the SQL file
curl https://defacto2.net/sql/files.sql --output files.sql

# copy the SQL file into the container
docker cp files.sql pgdb:/tmp/files.sql

# restore the data
docker exec pgdb psql --username=postgres --dbname=defacto2_ps --file=/tmp/files.sql

# cleanup
docker exec pgdb rm /tmp/files.sql

To test the data import.

docker exec -it pgdb psql --username=postgres --dbname='defacto2_ps' --command='SELECT COUNT(*) FROM files;'
 count
-------
  50000
(1 row)

About

The database for Defacto2, a website conserving defunct software, wares, and elite digital subcultures of the PC.

defacto2.net/sql/files.sql

Topics

databasedefacto2defacto2-website

Resources

Readme
Activity
Custom properties

Stars

11 stars

Watchers

1 watching

Forks

2 forks
Report repository

Used by

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.