diff --git a/README.md b/README.md index 4de16b3..31f98d1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # PostgreSQL Backup -PostgreSQL Backup is a Docker container image that can be used to backup, restore and migrate Postgres database. It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, and SSH compatible storage. +PostgreSQL Backup is a Docker container image that can be used to backup, restore and migrate Postgres database. It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, FTP and SSH compatible storage. It also supports __encrypting__ your backups using GPG. The [jkaninda/pg-bkup](https://hub.docker.com/r/jkaninda/pg-bkup) Docker image can be deployed on Docker, Docker Swarm and Kubernetes. diff --git a/docs/how-tos/backup-to-ftp.md b/docs/how-tos/backup-to-ftp.md new file mode 100644 index 0000000..5c27d46 --- /dev/null +++ b/docs/how-tos/backup-to-ftp.md @@ -0,0 +1,44 @@ +--- +title: Backup to FTP remote server +layout: default +parent: How Tos +nav_order: 4 +--- +# Backup to FTP remote server + + +As described for s3 backup section, to change the storage of your backup and use FTP Remote server as storage. You need to add `--storage ftp`. +You need to add the full remote path by adding `--path /home/jkaninda/backups` flag or using `REMOTE_PATH` environment variable. + +{: .note } +These environment variables are required for SSH backup `FTP_HOST_NAME`, `FTP_USER`, `REMOTE_PATH`, `FTP_PORT` or `FTP_PASSWORD`. + +```yml +services: + 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 + container_name: pg-bkup + command: backup --storage ftp -d database + environment: + - DB_PORT=5432 + - DB_HOST=postgres + - DB_NAME=database + - DB_USERNAME=username + - DB_PASSWORD=password + ## FTP config + - FTP_HOST_NAME="hostname" + - FTP_PORT=21 + - FTP_USER=user + - FTP_PASSWORD=password + - REMOTE_PATH=/home/jkaninda/backups + + # pg-bkup container must be connected to the same network with your database + networks: + - web +networks: + web: +``` \ No newline at end of file diff --git a/docs/how-tos/deploy-on-kubernetes.md b/docs/how-tos/deploy-on-kubernetes.md index 2e6a1e4..5566d4e 100644 --- a/docs/how-tos/deploy-on-kubernetes.md +++ b/docs/how-tos/deploy-on-kubernetes.md @@ -2,7 +2,7 @@ title: Deploy on Kubernetes layout: default parent: How Tos -nav_order: 8 +nav_order: 9 --- ## Deploy on Kubernetes diff --git a/docs/how-tos/encrypt-backup.md b/docs/how-tos/encrypt-backup.md index fbe976e..b228fe2 100644 --- a/docs/how-tos/encrypt-backup.md +++ b/docs/how-tos/encrypt-backup.md @@ -2,7 +2,7 @@ title: Encrypt backups using GPG layout: default parent: How Tos -nav_order: 7 +nav_order: 8 --- # Encrypt backup diff --git a/docs/how-tos/migrate.md b/docs/how-tos/migrate.md index e64cccb..b59925c 100644 --- a/docs/how-tos/migrate.md +++ b/docs/how-tos/migrate.md @@ -2,7 +2,7 @@ title: Migrate database layout: default parent: How Tos -nav_order: 9 +nav_order: 10 --- # Migrate database diff --git a/docs/how-tos/restore-from-s3.md b/docs/how-tos/restore-from-s3.md index 485c650..0f4a2e2 100644 --- a/docs/how-tos/restore-from-s3.md +++ b/docs/how-tos/restore-from-s3.md @@ -2,7 +2,7 @@ title: Restore database from AWS S3 layout: default parent: How Tos -nav_order: 5 +nav_order: 6 --- # Restore database from S3 storage diff --git a/docs/how-tos/restore-from-ssh.md b/docs/how-tos/restore-from-ssh.md index 646ec21..6aaffeb 100644 --- a/docs/how-tos/restore-from-ssh.md +++ b/docs/how-tos/restore-from-ssh.md @@ -2,7 +2,7 @@ title: Restore database from SSH layout: default parent: How Tos -nav_order: 6 +nav_order: 7 --- # Restore database from SSH remote server diff --git a/docs/how-tos/restore.md b/docs/how-tos/restore.md index d8f8f56..91f91fb 100644 --- a/docs/how-tos/restore.md +++ b/docs/how-tos/restore.md @@ -2,7 +2,7 @@ title: Restore database layout: default parent: How Tos -nav_order: 4 +nav_order: 5 --- # Restore database