HN user

xomodo

16 karma

dev from DK

Posts0
Comments19
View on HN
No posts found.
Litestream v0.5.0 10 months ago

Thx. The only problem I have with litestream binary is ~31Mb !?

This why I prefer to take backup stuff in a side container, eg: https://github.com/atrakic/gin-sqlite/blob/main/compose.yml

As a side note, you might consider revisiting your dockerfiles and skip litestream build steps, eg. in your final stage just add line like this:

COPY --from=litestream/litestream /usr/local/bin/litestream /bin/litestream

Thx. I have extended a bit as a script:

    # !/bin/bash
    ARG1=${1:-'select Date from stdin order by USD asc limit 1;'}
    curl -o - -Ls https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip \
  | funzip | sqlite3 -csv ':memory:' '.import /dev/stdin stdin' "${ARG1}"

    # Usage:
    $ ./run.sh 'select * from stdin limit 1;'

For accessing aws ec2 instances behind nat/fw add this lines ~/.ssh/config:

  Host i-* mi-*
   ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
   UserKnownHostsFile /dev/null
   StrictHostKeyChecking no
   User ubuntu
   LogLevel ERROR
   DynamicForward 5060
Usage: `ssh -i key.pem i-0xxxxxxxxxx`. Last config line can be used for optional proxy browsing.