Skip to content

Commit

Permalink
Merge pull request #1 from st3ga/feature/timescaledb-parallel-copy
Browse files Browse the repository at this point in the history
 - add timescaledb-parallel-copy
  • Loading branch information
ihatemodels authored Nov 20, 2022
2 parents 61088ae + 7bbaad4 commit 56da4d3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ fi
# show the aliases
alias aliases='bat -pp /root/doc/ALIASES.md'

alias p_copy='/usr/bin/timescaledb-parallel-copy'

# pg_dump aliases
alias pg_dump10='/usr/lib/postgresql/10/bin/pg_dump'
alias pg_dump11='/usr/lib/postgresql/11/bin/pg_dump'
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
FROM golang:1.19.3-alpine AS timescaledb-parallel-copy-builder
ENV TS_PARALLEL_COPY_VERSION="v0.4.0"
RUN apk add git --no-cache

WORKDIR /build

RUN git clone https://github.com/timescale/timescaledb-parallel-copy.git \
&& cd timescaledb-parallel-copy \
&& git checkout ${TS_PARALLEL_COPY_VERSION} \
&& cd cmd/timescaledb-parallel-copy \
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /build/timescaledb-parallel-copy

FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -6,6 +18,7 @@ COPY doc /root/doc/
COPY bin /root/bin/
COPY .bashrc /root/
COPY .bash /root/.bash/
COPY --from=timescaledb-parallel-copy-builder /build/timescaledb-parallel-copy /usr/bin/

# create base dirs
RUN mkdir -p /opt/backups /root/.config /root/.kube \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ This container provides easy access to most backup/restore utils for managing da
- **[pg_dumpall](https://www.postgresql.org/docs/current/app-pg-dumpall.html)**
- **[pg_restore](https://www.postgresql.org/docs/current/app-pgrestore.html)**

- **[timescaledb-parallel-copy](https://github.com/timescale/timescaledb-parallel-copy) version v0.4.0 build from surce**

- **Mongo tools version 100.5.2**
- **[mongodump](https://www.mongodb.com/docs/database-tools/mongodump/)**
- **[mongoexport](https://www.mongodb.com/docs/database-tools/mongoexport/)**
Expand Down
1 change: 1 addition & 0 deletions doc/ALIASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ This container provides the following bash aliases
| pg_dumpall13 | /usr/lib/postgresql/13/bin/pg_dumpall |
| pg_dumpall14 | /usr/lib/postgresql/14/bin/pg_dumpall |
| pg_dumpall15 | /usr/lib/postgresql/15/bin/pg_dumpall |
| p_copy | /usr/bin/timescaledb-parallel-copy |

![aliases](../assets/aliases.gif)

0 comments on commit 56da4d3

Please sign in to comment.