diff --git a/README.md b/README.md index 97dda00..2f40b98 100644 --- a/README.md +++ b/README.md @@ -100,32 +100,47 @@ spec: template: spec: containers: - - name: pg-bkup - # In production, it is advised to lock your image tag to a proper - # release version instead of using `latest`. - # Check https://github.com/jkaninda/pg-bkup/releases - # for a list of available releases. - image: jkaninda/pg-bkup - command: - - bkup - - backup - resources: - limits: - memory: "128Mi" - cpu: "500m" - env: - - name: DB_PORT - value: "5432" - - name: DB_HOST - value: "" - - name: DB_NAME - value: "dbname" - - name: DB_USERNAME - value: "postgres" - # Please use secret! - - name: DB_PASSWORD - value: "" - restartPolicy: Never + - name: pg-bkup + # In production, it is advised to lock your image tag to a proper + # release version instead of using `latest`. + # Check https://github.com/jkaninda/pg-bkup/releases + # for a list of available releases. + image: jkaninda/pg-bkup + command: + - /bin/sh + - -c + - bkup + - backup + - --storage + - s3 + resources: + limits: + memory: "128Mi" + cpu: "500m" + env: + - name: DB_PORT + value: "5432" + - name: DB_HOST + value: "" + - name: DB_NAME + value: "" + - name: DB_USERNAME + value: "" + # Please use secret! + - name: DB_PASSWORD + value: "" + - name: AWS_S3_ENDPOINT + value: "https://s3.amazonaws.com" + - name: AWS_S3_BUCKET_NAME + value: "xxx" + - name: AWS_REGION + value: "us-west-2" + - name: AWS_ACCESS_KEY + value: "xxxx" + - name: AWS_SECRET_KEY + value: "xxxx" + - name: AWS_DISABLE_SSL + value: "false" ``` ## Available image registries diff --git a/docs/_config.yml b/docs/_config.yml index 68527be..69ddbbd 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -13,12 +13,13 @@ # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. # You can create any custom variable you would like, and they will be accessible # in the templates via {{ site.myvariable }}. -title: Postgres database backup +title: PostgreSQL Backup Docker container image email: hi@jonaskaninda.com description: >- # this means to ignore newlines until "baseurl:" - PostgreSQL Backup and Restore Docker container image. Backup database to AWS S3 storage or SSH remote server. + PostgreSQL Backup is a Docker container image that can be used to backup and restore Postgres database. + It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, and SSH compatible storage. -baseurl: "" # the subpath of your site, e.g. /blog +baseurl: "https://jkaninda.github.io/mysql-bkup/" # the subpath of your site, e.g. /blog url: "jkaninda.github.io/pg-bkup/" # the base hostname & protocol for your site, e.g. http://example.com twitter_username: jonaskaninda github_username: jkaninda diff --git a/docs/how-tos/deploy-on-kubernetes.md b/docs/how-tos/deploy-on-kubernetes.md index bef0760..f9f7f89 100644 --- a/docs/how-tos/deploy-on-kubernetes.md +++ b/docs/how-tos/deploy-on-kubernetes.md @@ -28,6 +28,8 @@ spec: # for a list of available releases. image: jkaninda/pg-bkup command: + - /bin/sh + - -c - bkup - backup - --storage @@ -82,6 +84,8 @@ spec: # for a list of available releases. image: jkaninda/pg-bkup command: + - /bin/sh + - -c - bkup - backup - --storage @@ -138,6 +142,8 @@ spec: # for a list of available releases. image: jkaninda/pg-bkup command: + - /bin/sh + - -c - bkup - restore - --storage @@ -196,6 +202,8 @@ spec: # for a list of available releases. image: jkaninda/pg-bkup command: + - /bin/sh + - -c - bkup - backup - --storage @@ -262,6 +270,8 @@ spec: # for a list of available releases. image: jkaninda/pg-bkup command: + - /bin/sh + - -c - bkup - backup - --storage diff --git a/docs/how-tos/restore-from-ssh.md b/docs/how-tos/restore-from-ssh.md index b6ffc81..107c1a2 100644 --- a/docs/how-tos/restore-from-ssh.md +++ b/docs/how-tos/restore-from-ssh.md @@ -84,8 +84,6 @@ spec: value: "xxx" - name: SSH_REMOTE_PATH value: "/home/jkaninda/backups" - - name: AWS_ACCESS_KEY - value: "xxxx" - name: SSH_IDENTIFY_FILE value: "/tmp/id_ed25519" restartPolicy: Never diff --git a/examples/k8s-job.yaml b/examples/k8s-job.yaml index 659eeab..9f2650d 100644 --- a/examples/k8s-job.yaml +++ b/examples/k8s-job.yaml @@ -1,42 +1,49 @@ apiVersion: batch/v1 -kind: CronJob +kind: Job metadata: - name: bkup-job + name: backup spec: - schedule: "* * * * *" - jobTemplate: + template: spec: - template: - spec: - containers: - - name: pg-bkup - image: jkaninda/pg-bkup:v1.2.1 - command: - - pg-bkup backup -s s3 --path /custom_path - env: - - name: DB_PORT - value: "5432" - - name: DB_HOST - value: "" - - name: DB_NAME - value: "" - - name: DB_USERNAME - value: "" - # Please use secret! - - name: DB_PASSWORD - value: "" - - name: ACCESS_KEY - value: "" - - name: AWS_S3_ENDPOINT - value: "https://s3.amazonaws.com" - - name: AWS_S3_BUCKET_NAME - value: "xxx" - - name: AWS_REGION - value: "us-west-2" - - name: AWS_ACCESS_KEY - value: "xxxx" - - name: AWS_SECRET_KEY - value: "xxxx" - - name: AWS_DISABLE_SSL - value: "false" - restartPolicy: OnFailure \ No newline at end of file + containers: + - name: pg-bkup + # In production, it is advised to lock your image tag to a proper + # release version instead of using `latest`. + # Check https://github.com/jkaninda/pg-bkup/releases + # for a list of available releases. + image: jkaninda/pg-bkup + command: + - /bin/sh + - -c + - bkup + - backup + - --storage + - s3 + resources: + limits: + memory: "128Mi" + cpu: "500m" + env: + - name: DB_PORT + value: "5432" + - name: DB_HOST + value: "" + - name: DB_NAME + value: "" + - name: DB_USERNAME + value: "" + # Please use secret! + - name: DB_PASSWORD + value: "" + - name: AWS_S3_ENDPOINT + value: "https://s3.amazonaws.com" + - name: AWS_S3_BUCKET_NAME + value: "xxx" + - name: AWS_REGION + value: "us-west-2" + - name: AWS_ACCESS_KEY + value: "xxxx" + - name: AWS_SECRET_KEY + value: "xxxx" + - name: AWS_DISABLE_SSL + value: "false" \ No newline at end of file