Schedule Automatic Backups for PostgreSQL with pgAgent in pgAdmin

preview_player
Показать описание
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:
Рекомендации по теме
Комментарии
Автор

Hi sir, how to take differential backup automatically using pgagent!?

gayatritripathy
Автор

I'm getting this error while running the command stated at 01:53 as "WARNING: Couldn't create the primary connection"

jagadeeshjaga
Автор

It is not working showing the f status in status table pga_joblog

ShineMDITDept.Ahalia
Автор

Hi is there any option that I can restore data base automatically every day from a particular path

kuchpal
Автор

Hi, I'm getting f in statics status as u got at 5:26. can u help me

GHEC-ARCHANASV
Автор

Sir, I want to create a backup database that can automatically backup and replace the main database for my university graduation project. I wonder if you can help me

linhmai
Автор

Hi sir once i run pgagent host=/var/run/postgresql dbname= ... Command I got error could not create the primary connection attempt 10 this issue is solved user name i put correct same password --- then other issues is showing sir ---- unsupported schema version version 4 is required please run pgagent_upgrade.sql ??? What is this --- pgagent is updated 4 already

pritamchavan