pgmoneta.conf(5)
π Name π
pgmoneta.conf β the main configuration file for pgmoneta β¨ (yes bestie, this is pgmoneta.conf(5), and itβs kind of the main character of the whole setup).
β¨ DESCRIPTION β¨
Okay so pgmoneta.conf is the main configuration file for pgmoneta. Itβs split into different sections, and the section boundaries are specified by the [ and ] characters. The main section is called [pgmoneta].
Other sections specify the PostgreSQL server configuration.
All properties are in the format key = value.
The characters # and ; can be used for comments, and they must be the first character on the line. The Bool data type supports these values: on, 1, true, off, 0 and false.
π OPTIONS π
π«Ά The options for the main section are π«Ά
hostβ the bind address forpgmoneta. Mandatory.unix_socket_dirβ the Unix Domain Socket location. Mandatory.base_dirβ the base directory for the backup. Mandatory.metricsβ the metrics port. Default is0(disabled).consoleβ the web console port. Default is0(disabled).metrics_cache_max_ageβ the time to keep a Prometheus (metrics) response in cache. If this value is specified without units, it is taken as seconds. Setting this parameter to0disables caching. It supports the following units as suffixes:Sfor seconds (default),Mfor minutes,Hfor hours,Dfor days, andWfor weeks. Default is0(disabled).metrics_cache_max_sizeβ the maximum amount of data to keep in cache when serving Prometheus responses. Changes require restart. This parameter determines the size of memory allocated for the cache even ifmetrics_cache_max_ageormetricsare disabled. Its value, however, is taken into account only ifmetrics_cache_max_ageis set to a non-zero value. Supports suffixes:B(bytes), the default if omitted,KorKB(kilobytes),MorMB(megabytes),GorGB(gigabytes). Default is256k.managementβ the remote management port. Default is0(disabled).compressionβ the compression type (none,gzip,client-gzip,server-gzip,zstd,client-zstd,server-zstd,lz4,client-lz4,server-lz4,bzip2,client-bzip2). Default iszstd.compression_levelβ the compression level. Default is3.workersβ the number of workers that each process can use for its work. Use0to disable. Maximum is CPU count. Default is0.workspaceβ the directory for the workspace that incremental backup can use for its work. Default is/tmp/pgmoneta-workspace/.storage_engineβ the storage engine type (local,ssh,s3,azure). Default islocal.encryptionβ the encryption mode. Default isnone.
Available options:
noneβ no encryption (default value)aes | aes-256 | aes-256-cbcβ AES CBC (Cipher Block Chaining) mode with 256 bit key lengthaes-192 | aes-192-cbcβ AES CBC mode with 192 bit key lengthaes-128 | aes-128-cbcβ AES CBC mode with 128 bit key lengthaes-256-ctrβ AES CTR (Counter) mode with 256 bit key lengthaes-192-ctrβ AES CTR mode with 192 bit key lengthaes-128-ctrβ AES CTR mode with 128 bit key length
create_slotβ create a replication slot for all server. Valid values are:yes,no. Default isno.ssh_hostnameβ defines the hostname of the remote system for connection.ssh_usernameβ defines the username of the remote system for connection.ssh_base_dirβ the base directory for the remote backup.ssh_ciphersβ the supported ciphers for communication.aes | aes-256 | aes-256-cbcβ AES CBC (Cipher Block Chaining) mode with 256 bit key lengthaes-192 | aes-192-cbcβ AES CBC mode with 192 bit key lengthaes-128 | aes-128-cbcβ AES CBC mode with 128 bit key lengthaes-256-ctrβ AES CTR (Counter) mode with 256 bit key lengthaes-192-ctrβ AES CTR mode with 192 bit key lengthaes-128-ctrβ AES CTR mode with 128 bit key length
Otherwise verbatim. Default is aes-256-ctr, aes-192-ctr, aes-128-ctr.
ssh_public_key_fileβ the SSH public key file path. Supports environment variable interpolation (e.g.,$HOME). Default is$HOME/.ssh/id_rsa.pub.ssh_private_key_fileβ the SSH private key file path. Supports environment variable interpolation (e.g.,$HOME). Default is$HOME/.ssh/id_rsa.s3_regionβ the AWS region.s3_access_key_idβ the IAM access key ID.s3_secret_access_keyβ the IAM secret access key.s3_bucketβ the IAM secret access key.s3_base_dirβ the base directory for the S3 bucket.azure_storage_accountβ the Azure storage account name.azure_containerβ the Azure container name.azure_shared_keyβ the Azure storage account key.azure_base_dirβ the base directory for the Azure container.retentionβ the retention time in days, weeks, months, years. Default is7, - , - , -.retention_intervalβ the retention check interval. Default is300.log_typeβ the logging type (console,file,syslog). Default isconsole.log_levelβ the logging level, any of the (case insensitive) stringsFATAL,ERROR,WARN,INFOandDEBUG(that can be more specific asDEBUG1thruDEBUG5). Debug level greater than5will be set toDEBUG5. Not recognized values will make thelog_levelbeINFO. Default isinfo.log_pathβ the log file location. Default ispgmoneta.log. Can be astrftime(3)compatible string.log_rotation_ageβ the time after which log file rotation is triggered. If this value is specified without units, it is taken as seconds. Setting this parameter to0disables log rotation based on time. It supports the following units as suffixes:Sfor seconds (default),Mfor minutes,Hfor hours,Dfor days, andWfor weeks. Default is0(disabled).log_rotation_sizeβ the size of the log file that will trigger a log rotation. Supports suffixes:B(bytes), the default if omitted,KorKB(kilobytes),MorMB(megabytes),GorGB(gigabytes). A value of0(with or without suffix) disables. Default is0.log_line_prefixβ astrftime(3)compatible string to use as prefix for every log line. Must be quoted if contains spaces. Default is%Y-%m-%d %H:%M:%S.log_modeβ append to or create the log file (append,create). Default isappend.blocking_timeoutβ the number of seconds the process will be blocking for a connection. If this value is specified without units, it is taken as seconds. Setting this parameter to0disables it. It supports the following units as suffixes:Sfor seconds (default),Mfor minutes,Hfor hours,Dfor days, andWfor weeks. Default is30.max_rateβ the maximum backup transfer rate in bytes per second. Use0to disable. Default is0.progressβ enable backup progress tracking. Default isoff.tlsβ enable Transport Layer Security (TLS). Default isfalse.tls_cert_fileβ certificate file for TLS.tls_key_fileβ private key file for TLS.tls_ca_fileβ Certificate Authority (CA) file for TLS.metrics_cert_fileβ certificate file for TLS for Prometheus metrics.metrics_key_fileβ private key file for TLS for Prometheus metrics.metrics_ca_fileβ Certificate Authority (CA) file for TLS for Prometheus metrics.libevβ the libev backend to use. Valid options:auto,select,poll,epoll,iouring,devpollandport. Default isauto.keep_aliveβ haveSO_KEEPALIVEon sockets. Default ison.nodelayβ haveTCP_NODELAYon sockets. Default ison.non_blockingβ haveO_NONBLOCKon sockets. Default ison.backlogβ the backlog forlisten(). Minimum16. Default is16.hugepageβ huge page support. Default istry.direct_ioβ direct I/O support for local storage (off,auto,on). Whenon, bypasses kernel page cache usingO_DIRECT. Whenauto, attemptsO_DIRECTand falls back to buffered I/O if unsupported. Linux only. Default isoff.pidfileβ path to the PID file.update_process_titleβ the behavior for updating the operating system process title. Allowed settings are:never(oroff) β does not update the process title.strictβ sets the process title without overriding the existing initial process title length.minimalβ sets the process title to the base description.verbose(orfull) β sets the process title to the full description.
Please note that strict and minimal are honored only on those systems that do not provide a native way to set the process title (e.g., Linux). On other systems, there is no difference between strict and minimal and the assumed behaviour is minimal even if strict is used. never and verbose are always honored, on every system. On Linux systems the process title is always trimmed to 255 characters, while on system that provide a natve way to set the process title it can be longer. Default is verbose.
π The options for the PostgreSQL section are π
hostβ the address of the PostgreSQL instance. Mandatory.portβ the port of the PostgreSQL instance. Mandatory.userβ the user name for the replication role. Mandatory.extraβ the source directory for retrieval on the server side.wal_slotβ the WAL slot. Mandatory.create_slotβ create a replication slot for all server. Valid values are:yes,no. Default isno.followβ failover to this server if follow server fails.retentionβ the retention for the server in days, weeks, months, years.wal_shippingβ the WAL shipping directory.workspaceβ the directory for the workspace that incremental backup can use for its work. Default is/tmp/pgmoneta-workspace/.hot_standbyβ hot standby directory. Single directory or comma separated directories up to8(e.g.,/path/to/hot/standby1,/path/to/hot/standby2).hot_standby_overridesβ files to override in the hot standby directory. If multiple hot standbys are specified then this setting is separated by a|.hot_standby_tablespacesβ bestie this is the tablespace mapping for the hot standby π« and the syntax is literally[from -> to,?]+. If you've got multiple hot standbys going, separate this setting with a|. That's it, that's the vibe.workersβ how many workers each process gets to throw at its work π οΈ. Use0to disable it,-1means "just use the global setting, don't be extra". Maximum is your CPU count, no squeezing more out of it than that. Default is-1.max_rateβ the maximum backup transfer rate, measured in bytes per second ποΈπ¨. Use0to disable,-1means use the global setting. Default is-1.progressβ turns backup progress tracking on or off π. Useonto enable,offto disable, and-1means use the global setting. Default is-1.verificationβ the time between verifications of a backup β°. If you give this value with no units, it's taken as seconds β no cap. Setting this parameter to0disables verification entirely. It supports these unit suffixes:'S'for seconds (that's the default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled, so nothing gets verified until you say so).tls_cert_fileβ the certificate file for TLS π. Heads up: this file must be owned by either the user running pgmoneta orroot. No random owners, okay?tls_key_fileβ the private key file for TLS ποΈ. Same ownership deal: it must be owned by either the user running pgmoneta orroot. AND the permissions have to be at least0640when it's owned by root, or0600otherwise. Not me being strict β that's just the rule, fr fr.tls_ca_fileβ the Certificate Authority (CA) file for TLS π. Again: this file must be owned by either the user running pgmoneta orroot.
π REPORTING BUGS π
Spotted a bug? Got a little "um, actually" moment? pgmoneta is maintained on GitHub at <https://github.com/pgmoneta/pgmoneta> β that's the spot, bestie π«Ά
π COPYRIGHT π
pgmoneta is licensed under the 3-clause BSD License βοΈβ¨
π SEE ALSO π
Go read these too, they're all part of the lore π
πΈ and that's a wrap on pgmoneta.conf(5)! the little footer down there is just the source/version and date flexing on us β you know the drill, slay, stay configured, and may your backups always verify π
πβ¨
π¦ where this page comes from
- nixos 26.05: pgmoneta 0.21.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms