Schedule Automatic Backups for PostgreSQL with pgAgent in pgAdmin



Schedule Automatic Backups for PostgreSQL with pgAgent in pgAdmin

Schedule Automatic Backups for PostgreSQL with pgAgent in pgAdmin

pgAgent is a tool used for scheduling jobs for PostgreSQL databases. It also has more powerful scheduling capabilities than the often-used cron because it is specifically built for handling Postgres tasks. For example, pgAgent can schedule multiple steps without a batch script or without repeating the command. It’s important to note that even if you have pgAdmin installed, pgAgent must be downloaded independently, specifically as an extension to pgAdmin.

In this tutorial you will install pgAgent, configure your database to use pgAgent on the pgAdmin Graphical User Interface (GUI), set up pgAgent as a daemon, and then use pgAgent to schedule a job that will back up your database.

Command used
Step 1
sudo apt install pgagent

Step 2
pgagent host=/var/run/postgresql dbname=sammy user=sammy

Useful links:
VPS/VDS – https://mivocloud.com/

Comments are closed.