🟢 Lesson 3: PostgreSQL enable archive mode

Опубликовано: 04 Октябрь 2024
на канале: IT-INZHENER
168
1

In today's video, we will show you how to enable WAL log archiving in PostgreSQL.
WAL logs are translated as - Write Ahead Log. Enabling event log archiving is a very important step if you want to protect the data of any important database.
In simple terms, archiving is the process of creating a backup copy of all transactions that have occurred in a database so that the database can later be restored to any point in time in the event of a serious failure.
In PostgreSQL, absolutely any transaction in progress is first written to the WAL log file and then applied to the actual database data files. As long as you keep adding and changing data in the database, WAL files keep being created.
In PostgreSQL terms, copying WAL-generated logs is called archiving, which is used for backup and restore, point-in-time restore, and database replication to a backup server in case of an emergency.

0:00 Start
0:11 Switching to the user postgres
0:30 Connecting to the database via the console psql
0:37 Checking the current archiving status
1:15 Create a directory for the log archive
1:40 Enable archiving through the configuration file
2:45 Restarting the database
2:56 Recheck the archiving status
3:37 The end


#postgresql #dbms #postgres #archive_mod