| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
These instructions are for a Linux or macOS environment with a running PostgreSQL application and assumes the postgres username.
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.sqlTo 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.
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.sqlThese instructions are for a Linux or macOS environment with a running a Docker PostgreSQL container with the following assumptions:
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.sqlTo test the data import.
docker exec -it pgdb psql --username=postgres --dbname='defacto2_ps' --command='SELECT COUNT(*) FROM files;' count
-------
50000
(1 row)| Back | FazBrowse Home | New Git URL |