Open Telegram and search for @BotFather user and message them the following:
You
/newbot
BotFather
# Backup | |
docker exec -t your-db-container pg_dumpall -c -U your-db-user > your_dump.sql | |
# Restore | |
cat your_dump.sql | docker exec -i your-db-container psql -U your-db-user -d your-db-name |
FROM ghcr.io/graalvm/graalvm-ce:21.0.0 AS build-aot | |
RUN curl https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -o /tmp/maven.tar.gz | |
RUN tar xf /tmp/maven.tar.gz -C /opt | |
RUN ln -s /opt/apache-maven-3.6.3 /opt/maven | |
RUN ln -s /opt/graalvm-ce-java11-21.0.0 /opt/graalvm | |
RUN gu install native-image | |
ENV JAVA_HOME=/opt/graalvm | |
ENV M2_HOME=/opt/maven |
$ cd /tmp | |
$ curl -L https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11_openj9-0.23.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.9_11_openj9-0.23.0.tar.gz --output jdk.tgz | |
$ tar -zxvf jdk.tgz | |
$ jdk-11.0.9+11/bin/jps -l | |
687 jdk.jcmd/openj9.tools.attach.diagnostics.tools.Jps | |
7 /opt/webservice/webservice.jar | |
$ jdk-11.0.9+11/bin/jcmd 7 GC.heap_dump /tmp/heapdump | |
Dump written to /tmp/heapdump |
/usr/local/pgsql-12/pg_dumpall --file "/var/lib/pgadmin/storage/tech_yadev.eu/dump-12.3.sql" --host "db-postgre.db.svc.cluster.local" --port "5432" --username "toor" --no-password --database "postgres" --verbose |
GRANT ALL PRIVILEGES ON *.* TO 'toor'@'10.x.x.x' IDENTIFIED BY 'xxxxxpassword' WITH GRANT OPTION; | |
flush privileges; |
MySQL | PostgreSQL | Description | |||
---|---|---|---|---|---|
mysql -u -p<password | psql -U -P | Start command line client, and connect to | |||
SHOW DATABASES; | \l | Show available databases | |||
SHOW TABLES; | \dt | Show available tables | |||
USE ; | \c | Connect to | |||
DESCRIBE ;
|
I hereby claim:
To claim this, I am signing this object:
# docker exec 0c34 ps aux | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 0.0 0.0 2388 764 ? Ss 08:11 0:00 /bin/sh -c ./docker-entrypoint.sh | |
root 6 47.8 7.0 7887600 1134504 ? Sl 08:11 2:06 java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8000 -Djava.security.egd=file:/dev/./urandom --add-opens java.base/java.lang=ALL-UNNAMED -XX:+UseContainerSupport -XX:+AlwaysActAsServerClassMachine -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/dumps -jar /app/yals.jar | |
root 487 0.0 0.0 9392 3088 ? Rs 08:16 0:00 ps aux | |
# docker exec 0c34 jcmd 6 GC.heap_dump /opt/dumps/test.dump | |
6: | |
Heap dump file created |
+--------------------+----------------------+-----------------+-----------------+ | |
| Expression | FOO="world" | FOO="" | unset FOO | | |
| in script: | (Set and Not Null) | (Set But Null) | (Unset) | | |
+--------------------+----------------------+-----------------+-----------------+ | |
| ${FOO:-hello} | world | hello | hello | | |
| ${FOO-hello} | world | "" | hello | | |
| ${FOO:=hello} | world | FOO=hello | FOO=hello | | |
| ${FOO=hello} | world | "" | FOO=hello | | |
| ${FOO:?hello} | world | error, exit | error, exit | | |
| ${FOO?hello} | world | "" | error, exit | |