summaryrefslogtreecommitdiffstats
path: root/notes/database_dumps_backups.txt
blob: 4ca72d8801704f5777f81acd173d5119f7f837ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


## Full Postgres Backup

Backing up the entire database using `pg_dump`, with parallelism 1 (use more on
larger machine with fast disks; try 4 or 8?), assuming the database name is
'fatcat', and the current user has access:

    pg_dump -j1 -Fd -f test-dump fatcat

## Identifier Dumps

The `extras/quick_dump.sql` script will dump abstracts and identifiers as TSV
files to `/tmp/`. Pretty quick; takes about 15 GB of disk space (uncompressed).

## Releases Export

    # simple command
    ./fatcat_export.py releases /tmp/fatcat_ident_releases.tsv /tmp/releases-dump.json

    # usual command
    time ./fatcat_export.py releases /tmp/fatcat_ident_releases.tsv - | pv -l | wc

## Changelog Export

    # simple command
    ./fatcat_export.py changelog /tmp/changelog-dump.json

    # usual command
    time ./fatcat_export.py changelog - | pv -l | wc