Answer the question
In order to leave comments, you need to log in
How to make backups/dumps in Postgresql? What is a free and easy solution that many people use?
The base is small. On vskidku let it be 1Gb
How is it better and easier to make backups / dumps? pg_dump or pg_dump_all? In what format?
Or like this:
*What 2-3 tools are used by the majority as de-facto?*
Answer the question
In order to leave comments, you need to log in
Depends on backup requirements.
If you need point in time recovery, i.e. the ability to restore the state of the cluster to some arbitrary transaction - then this is pg_basebackup + WAL archive.
In order not to assemble the constructor manually, there is a barman. If you want to backup somewhere in s3, then wal-e or wal-g will be easier.
One database separately cannot be backed up and restored in this way, only the entire instance. Backup volume = the volume of the entire instance + the volume of all WALs from the start of basebackup to the desired recovery moment, the number of wal depends on your writing load.
If there are enough logical snapshots of data, for example, daily ones, then yes, pg_dump. Recovery, respectively, only at the time the dump was started.
Typically pg_dumpall -g is done to save the global cluster data - users, tablespace, database names and a separate pg_dump for those databases that need to be backed up.
The format is often custom made. it is regularly compressed and allows you to restore certain objects from the dump through pg_restore, and not just the whole thing as text through psql. For a gigabyte database, it makes no sense, but for larger databases it makes sense to make the directory format into several threads.
We use backup.github.io/backup/v4/installation for backups, the flight is stable for several years.
I don't think this is the solution most people use. But the thing is good
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question