{"id":10809,"date":"2018-02-14T15:58:57","date_gmt":"2018-02-14T14:58:57","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/"},"modified":"2023-06-09T16:53:18","modified_gmt":"2023-06-09T14:53:18","slug":"backup-and-restore-postgresql-with-pgbackrest-i","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/","title":{"rendered":"Backup and Restore PostgreSQL with PgBackRest I"},"content":{"rendered":"<p><strong>By Mouhamadou Diaw<\/strong><\/p>\n<p>Many tools can be used to backup PostgreSQL databases. In this blog I will talk about <a href=\"http:\/\/www.pgbackrest.org\/\" target=\"_blank\" rel=\"noopener\">PgBackRest<\/a> which is a simple tool that can be used to backup and restore a PostgreSQL database. Full, differential, and incremental backups are supported.<br \/>\nIn this first blog I will present a basic configuration of pgbackprest. Our configuration is composed of only one cluster and pgbackrest is installed on the server hosting the database. The goal is to explain a first use of PgBackRest.<br \/>\nBelow our configuration<br \/>\nServer with Oracle Linux 7<br \/>\nPostgreSQL 10.1<br \/>\nPgBackRest 1.28<br \/>\nWe supposed that the linux box and PostgreSQL 10.1 are already installed. So let\u2019s install PgBackRest.<br \/>\n<code><br \/>\nroot@pgserver ~]# yum search pgbackrest<br \/>\nLoaded plugins: langpacks, ulninfo<br \/>\n=========================== N\/S matched: pgbackrest ============================<br \/>\npgbackrest.noarch : Reliable PostgreSQL Backup &amp; Restore<br \/>\npgbackrest.x86_64 : Reliable PostgreSQL Backup &amp; Restore<br \/>\nName and summary matches only, use \"search all\" for everything<br \/>\n<\/code><br \/>\nAnd then we can install PgBackRest<br \/>\n<code>[root@pgserver ~]# yum install  pgbackrest.x86_64<\/code><br \/>\nAfter we can check the installation using pgbackrest command<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ \/usr\/bin\/pgbackrest<br \/>\npgBackRest 1.28 - General help<br \/>\nUsage:<br \/>\npgbackrest [options] [command]<br \/>\nCommands:<br \/>\narchive-get     Get a WAL segment from the archive.<br \/>\narchive-push    Push a WAL segment to the archive.<br \/>\nbackup          Backup a database cluster.<br \/>\ncheck           Check the configuration.<br \/>\nexpire          Expire backups that exceed retention.<br \/>\nhelp            Get help.<br \/>\ninfo            Retrieve information about backups.<br \/>\nrestore         Restore a database cluster.<br \/>\nstanza-create   Create the required stanza data.<br \/>\nstanza-delete   Delete a stanza.<br \/>\nstanza-upgrade  Upgrade a stanza.<br \/>\nstart           Allow pgBackRest processes to run.<br \/>\nstop            Stop pgBackRest processes from running.<br \/>\nversion         Get version.<br \/>\nUse 'pgbackrest help [command]' for more information.<br \/>\n<\/code><br \/>\nThe configuration of PgBackRest is very easy, it consists of a configuration <strong>pgbackrest.conf<\/strong> file that must be edited. In my case the file is located in \/etc. As specified, we will use a very basic configuration file.<br \/>\nBelow the contents of my configuration file<br \/>\n<code><br \/>\n[root@pgserver etc]# cat pgbackrest.conf<br \/>\n[global]<br \/>\nrepo-path=\/var\/lib\/pgbackrest<br \/>\n[clustpgserver]<br \/>\ndb-path=\/var\/lib\/pgsql\/10\/data<br \/>\nretention-full=2<br \/>\n[root@pgserver etc]#<br \/>\n<\/code><br \/>\nIn the file above,<br \/>\n\u2022 repo-path is where backup will be stored,<br \/>\n\u2022 clusterpgserver is the name of my cluster stanza (free to take what you want as name). A stanza is the configuration for a PostgreSQL database cluster that defines where it is located, how it will be backed up, archiving options, etc.<br \/>\n\u2022 db-path is the path of my database files<br \/>\n\u2022 retention-full : configure retention to 2 full backups<br \/>\nA complete list can be found <a href=\"http:\/\/pgbackrest.org\/configuration.html\" target=\"_blank\" rel=\"noopener\">here<\/a><br \/>\nOnce the configuration file done, we can now create the stanza with the command create-stanza. Note that my PostgreSQL cluster is using the port 5435.<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info --db-port=5435  stanza-create<br \/>\n2018-02-08 14:01:49.293 P00   INFO: stanza-create command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --db1-port=5435 --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --stanza=clustpgserver<br \/>\n2018-02-08 14:01:50.707 P00   INFO: stanza-create command end: completed successfully<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nAfter we create the stanza, we can verify that the configuration is fine using the check command<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info --db-port=5435  check<br \/>\n2018-02-08 14:03:42.095 P00   INFO: check command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --db1-port=5435 --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --stanza=clustpgserver<br \/>\n2018-02-08 14:03:48.805 P00   INFO: WAL segment 00000001000000000000000C successfully stored in the archive at '\/var\/lib\/pgbackrest\/archive\/clustpgserver\/10-1\/0000000100000000\/00000001000000000000000C-c387b901a257bac304f27865478fd9f768de83d6.gz'<br \/>\n2018-02-08 14:03:48.808 P00   INFO: check command end: completed successfully<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nSince we did not take yet any backup with PgBackRest, the command info for the backups returns error<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info info<br \/>\nstanza: clustpgserver<br \/>\nstatus: error (no valid backups)<br \/>\ndb (current)<br \/>\nwal archive min\/max (10-1): 00000001000000000000000C \/ 00000001000000000000000C<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nNow let\u2019s take a backup<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info --db-port=5435  backup<br \/>\n2018-02-08 14:06:52.706 P00   INFO: backup command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --db1-port=5435 --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --retention-full=2 --stanza=clustpgserver<br \/>\n<strong>WARN: no prior backup exists, incr backup has been changed to full<\/strong><br \/>\n2018-02-08 14:06:54.734 P00   INFO: execute non-exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-02-08 14:06:53\": backup begins after the next regular checkpoint completes<br \/>\n2018-02-08 14:06:55.159 P00   INFO: backup start archive = 00000001000000000000000E, lsn = 0\/E000060<br \/>\n2018-02-08 14:07:09.867 P01   INFO: backup file \/var\/lib\/pgsql\/10\/data\/base\/13805\/1255 (592KB, 2%) checksum 61f284092cabf44a30d1442ef6dd075b2e346b7f<br \/>\n\u2026<br \/>\n\u2026<br \/>\n2018-02-08 14:08:34.709 P00   INFO: expire command begin 1.28: --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --retention-archive=2 --retention-full=2 --stanza=clustpgserver<br \/>\n2018-02-08 14:08:34.895 P00   INFO: full backup total &lt; 2 - using oldest full backup for 10-1 archive retention<br \/>\n2018-02-08 14:08:34.932 P00   INFO: expire command end: completed successfully<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nWe can see that by default PgBackRest will try to do an incremental backup. But as there is no full backup yet, a full backup will be done. Once full backup done, all future backups will be incremental unless we specify the type of backup.<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info --db-port=5435  backup<br \/>\n2018-02-08 14:26:25.590 P00   INFO: backup command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --db1-port=5435 --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --retention-full=2 --stanza=clustpgserver<br \/>\n2018-02-08 14:26:29.314 P00   INFO: last backup label = 20180208-140653F, version = 1.28<br \/>\n2018-02-08 14:26:30.135 P00   INFO: execute non-exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-02-08 14:26:26\": backup begins after the next regular checkpoint completes<br \/>\n...<br \/>\n2018-02-08 14:27:01.408 P00   INFO: expire command begin 1.28: --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --retention-archive=2 --retention-full=2 --stanza=clustpgserver<br \/>\n2018-02-08 14:27:01.558 P00   INFO: full backup total &lt; 2 - using oldest full backup for 10-1 archive retention<br \/>\n2018-02-08 14:27:01.589 P00   INFO: expire command end: completed successfully<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nIf we want to perform another full backup we can specify the option &#8211;type=full<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info --db-port=5435  --type=full backup<br \/>\n2018-02-08 14:30:05.961 P00   INFO: backup command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --db1-port=5435 --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --retention-full=2 --stanza=clustpgserver --type=full<br \/>\n2018-02-08 14:30:08.472 P00   INFO: execute non-exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-02-08 14:30:06\": backup begins after the next regular checkpoint completes<br \/>\n2018-02-08 14:30:08.993 P00   INFO: backup start archive = 000000010000000000000012, lsn = 0\/12000028<br \/>\n\u2026.<br \/>\n\u2026.<br \/>\n<\/code><br \/>\nTo have info about our backups<br \/>\n<code>[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver  info<br \/>\nstanza: clustpgserver<br \/>\nstatus: ok<br \/>\ndb (current)<br \/>\nwal archive min\/max (10-1): 00000001000000000000000E \/ 000000010000000000000012<br \/>\nfull backup: 20180208-140653F<br \/>\ntimestamp start\/stop: 2018-02-08 14:06:53 \/ 2018-02-08 14:08:19<br \/>\nwal start\/stop: 00000001000000000000000E \/ 00000001000000000000000E<br \/>\ndatabase size: 23.2MB, backup size: 23.2MB<br \/>\nrepository size: 2.7MB, repository backup size: 2.7MB<br \/>\nincr backup: 20180208-140653F_20180208-142626I<br \/>\ntimestamp start\/stop: 2018-02-08 14:26:26 \/ 2018-02-08 14:26:52<br \/>\nwal start\/stop: 000000010000000000000010 \/ 000000010000000000000010<br \/>\ndatabase size: 23.2MB, backup size: 8.2KB<br \/>\nrepository size: 2.7MB, repository backup size: 472B<br \/>\nbackup reference list: 20180208-140653F<br \/>\nfull backup: 20180208-143006F<br \/>\ntimestamp start\/stop: 2018-02-08 14:30:06 \/ 2018-02-08 14:31:30<br \/>\nwal start\/stop: 000000010000000000000012 \/ 000000010000000000000012<br \/>\ndatabase size: 23.2MB, backup size: 23.2MB<br \/>\nrepository size: 2.7MB, repository backup size: 2.7MB<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nNow that we see how to perform backup with pgbackrest, let\u2019s see how to restore.<br \/>\nFirst let identify the directory of our database files<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ psql<br \/>\npsql (10.1)<br \/>\nType \"help\" for help.<br \/>\npostgres=# show data_directory ;<br \/>\ndata_directory<br \/>\n------------------------<br \/>\n\/var\/lib\/pgsql\/10\/data<br \/>\n(1 row)<br \/>\npostgres=#<br \/>\n<\/code><br \/>\nAnd let\u2019s remove all files in the directory<br \/>\n<code><br \/>\n[postgres@pgserver data]$ pwd<br \/>\n\/var\/lib\/pgsql\/10\/data<br \/>\n[postgres@pgserver data]$ ls<br \/>\nbase              pg_dynshmem    pg_notify     pg_stat_tmp  pg_wal                postmaster.pid<br \/>\ncurrent_logfiles  pg_hba.conf    pg_replslot   pg_subtrans  pg_xact<br \/>\nglobal            pg_ident.conf  pg_serial     pg_tblspc    postgresql.auto.conf<br \/>\nlog               pg_logical     pg_snapshots  pg_twophase  postgresql.conf<br \/>\npg_commit_ts      pg_multixact   pg_stat       PG_VERSION   postmaster.opts<br \/>\n[postgres@pgserver data]$ rm -rf *<br \/>\n[postgres@pgserver data]$<br \/>\n<\/code><br \/>\nNow if we try to connect, of course we will get errors<br \/>\n<code><br \/>\n[postgres@pgserver data]$ psql<br \/>\npsql: could not connect to server: No such file or directory<br \/>\nIs the server running locally and accepting<br \/>\nconnections on Unix domain socket \"\/var\/run\/postgresql\/.s.PGSQL.5435\"?<br \/>\n[postgres@pgserver data]$<br \/>\n<\/code><br \/>\nSo let\u2019s restore with PgBackRest with the restore command<br \/>\n<code><br \/>\n[postgres@pgserver ~]$ pgbackrest --stanza=clustpgserver --log-level-console=info   restore<br \/>\n2018-02-08 14:52:01.845 P00   INFO: restore command begin 1.28: --db1-path=\/var\/lib\/pgsql\/10\/data --log-level-console=info --repo-path=\/var\/lib\/pgbackrest --stanza=clustpgserver<br \/>\n2018-02-08 14:52:03.490 P00   INFO: restore backup set 20180208-143006F<br \/>\n2018-02-08 14:52:21.904 P01   INFO: restore file \/var\/lib\/pgsql\/10\/data\/base\/13805\/1255 (592KB, 2%) checksum 61f284092cabf44a30d1442ef6dd075b2e346b7f<br \/>\n\u2026.<br \/>\n\u2026.<br \/>\n2018-02-08 14:53:21.186 P00   INFO: write \/var\/lib\/pgsql\/10\/data\/recovery.conf<br \/>\n2018-02-08 14:53:23.948 P00   INFO: restore global\/pg_control (performed last to ensure aborted restores cannot be started)<br \/>\n2018-02-08 14:53:28.258 P00   INFO: restore command end: completed successfully<br \/>\n[postgres@pgserver ~]$<br \/>\n<\/code><br \/>\nAt the end of the backup, a recovery.conf file is created in the data directory<br \/>\n<code><br \/>\n[postgres@pgserver data]$ cat recovery.conf<br \/>\nrestore_command = '\/usr\/bin\/pgbackrest --log-level-console=info --stanza=clustpgserver archive-get %f \"%p\"'<br \/>\n<\/code><br \/>\nNow we can restart the PostgreSQL cluster<br \/>\n<code><br \/>\n[postgres@pgserver data]$ pg_ctl start<br \/>\nwaiting for server to start....2018-02-08 14:57:06.519 CET [4742] LOG:  listening on IPv4 address \"0.0.0.0\", port 5435<br \/>\n2018-02-08 14:57:06.522 CET [4742] LOG:  listening on IPv6 address \"::\", port 5435<br \/>\n2018-02-08 14:57:06.533 CET [4742] LOG:  listening on Unix socket \"\/var\/run\/postgresql\/.s.PGSQL.5435\"<br \/>\n2018-02-08 14:57:06.551 CET [4742] LOG:  listening on Unix socket \"\/tmp\/.s.PGSQL.5435\"<br \/>\n2018-02-08 14:57:06.645 CET [4742] LOG:  redirecting log output to logging collector process<br \/>\n2018-02-08 14:57:06.645 CET [4742] HINT:  Future log output will appear in directory \"log\".<br \/>\n...... done<br \/>\nserver started<br \/>\n<\/code><br \/>\nAnd then connect<br \/>\n<code><br \/>\n[postgres@pgserver data]$ psql<br \/>\npsql (10.1)<br \/>\nType \"help\" for help.<br \/>\npostgres=#<br \/>\n<\/code><br \/>\n<strong>Conclusion <\/strong><br \/>\nIn this blog we shown in a simple configuration how to perform backup using PgBackRest. This basic configuration can help for first use of PgBackRest. In future articles we will go further in an advanced use of this tool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Mouhamadou Diaw Many tools can be used to backup PostgreSQL databases. In this blog I will talk about PgBackRest which is a simple tool that can be used to backup and restore a PostgreSQL database. Full, differential, and incremental backups are supported. In this first blog I will present a basic configuration of pgbackprest. [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[202,77,1108,854],"type_dbi":[],"class_list":["post-10809","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-backup","tag-postgresql","tag-postgresql-10","tag-restore"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Backup and Restore PostgreSQL with PgBackRest I - dbi Blog<\/title>\n<meta name=\"description\" content=\"PostgreSQL 10.1, PgBackRest, Backup, Restore\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Backup and Restore PostgreSQL with PgBackRest I\" \/>\n<meta property=\"og:description\" content=\"PostgreSQL 10.1, PgBackRest, Backup, Restore\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-14T14:58:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-09T14:53:18+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Backup and Restore PostgreSQL with PgBackRest I\",\"datePublished\":\"2018-02-14T14:58:57+00:00\",\"dateModified\":\"2023-06-09T14:53:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/\"},\"wordCount\":501,\"commentCount\":0,\"keywords\":[\"Backup\",\"PostgreSQL\",\"PostgreSQL 10\",\"Restore\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/\",\"name\":\"Backup and Restore PostgreSQL with PgBackRest I - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2018-02-14T14:58:57+00:00\",\"dateModified\":\"2023-06-09T14:53:18+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"PostgreSQL 10.1, PgBackRest, Backup, Restore\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/backup-and-restore-postgresql-with-pgbackrest-i\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backup and Restore PostgreSQL with PgBackRest I\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Backup and Restore PostgreSQL with PgBackRest I - dbi Blog","description":"PostgreSQL 10.1, PgBackRest, Backup, Restore","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/","og_locale":"en_US","og_type":"article","og_title":"Backup and Restore PostgreSQL with PgBackRest I","og_description":"PostgreSQL 10.1, PgBackRest, Backup, Restore","og_url":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/","og_site_name":"dbi Blog","article_published_time":"2018-02-14T14:58:57+00:00","article_modified_time":"2023-06-09T14:53:18+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Backup and Restore PostgreSQL with PgBackRest I","datePublished":"2018-02-14T14:58:57+00:00","dateModified":"2023-06-09T14:53:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/"},"wordCount":501,"commentCount":0,"keywords":["Backup","PostgreSQL","PostgreSQL 10","Restore"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/","url":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/","name":"Backup and Restore PostgreSQL with PgBackRest I - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-02-14T14:58:57+00:00","dateModified":"2023-06-09T14:53:18+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"PostgreSQL 10.1, PgBackRest, Backup, Restore","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/backup-and-restore-postgresql-with-pgbackrest-i\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Backup and Restore PostgreSQL with PgBackRest I"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10809"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10809\/revisions"}],"predecessor-version":[{"id":25762,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10809\/revisions\/25762"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10809"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=10809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}