{"id":13868,"date":"2020-03-30T14:50:10","date_gmt":"2020-03-30T12:50:10","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/"},"modified":"2020-03-30T14:50:10","modified_gmt":"2020-03-30T12:50:10","slug":"rapid-postgresql-cloning-using-aws-ebs-snapshots","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/","title":{"rendered":"Rapid PostgreSQL cloning using AWS EBS snapshots"},"content":{"rendered":"<p>When you go for <a href=\"https:\/\/aws.amazon.com\/ec2\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS EC2<\/a> instances to host your PostgreSQL deployments and you want to rapidly clone PostgreSQL instances for development or testing purposes you can make use of <a href=\"https:\/\/aws.amazon.com\/ebs\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS EBS<\/a> snapshots. In this post we&#8217;ll look at how you can quickly spin up EC2 instances that use these snapshots as a base for new PostgreSQL clusters. Although we&#8217;ll be using the AWS console to show how this can be done you should use some automation around this to make it really rapid. There are several options you can go for like the <a href=\"https:\/\/aws.amazon.com\/cli\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS command line interface<\/a>, <a href=\"https:\/\/www.terraform.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Terraform<\/a>, <a href=\"https:\/\/aws.amazon.com\/cloudformation\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CloudFormation<\/a>, <a href=\"https:\/\/github.com\/ansible\/ansible\" target=\"_blank\" rel=\"noopener noreferrer\">Ansible<\/a> and many more.<\/p>\n<p><!--more--><\/p>\n<p>In the last posts about AWS we mainly used the <a href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/Centosorg-CentOS-7-x8664-with-Updates-HVM\/B00O7WM7QW\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS<\/a>, <a href=\"https:\/\/access.redhat.com\/solutions\/15356\" target=\"_blank\" rel=\"noopener noreferrer\">Red Hat<\/a> or <a href=\"https:\/\/aws.amazon.com\/amazon-linux-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Linux 2<\/a> AMIs. In this post, just to make it a bit more colorful, we&#8217;ll be using <a href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/Amazon-Web-Services-SUSE-Linux-Enterprise-Server-1\/B07SPX8ML1\" target=\"_blank\" rel=\"noopener noreferrer\">SUSE Linux Enterprise 15<\/a>. The base setup for SLES 15 in AWS is straight forward so not all screenshots will be provided, except this one:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\" alt=\"\" width=\"1000\" height=\"189\" class=\"aligncenter size-full wp-image-38663\" \/><\/a><\/p>\n<p>The second EBS volume will be the one for <a href=\"https:\/\/www.postgresql.org\/docs\/12\/storage-file-layout.html\" target=\"_blank\" rel=\"noopener noreferrer\">PGDATA<\/a> and this will also be the one we&#8217;ll be using as the source for our snapshots. The second volume will show up as xvdb and not as sdb as it is listed in the above screenshot:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [6,13]\">\nip-10-0-1-22:\/home\/ec2-user $ ls -la \/dev\/xv*\nbrw-rw---- 1 root disk 202,  0 Mar 30 05:50 \/dev\/xvda\nbrw-rw---- 1 root disk 202,  1 Mar 30 05:50 \/dev\/xvda1\nbrw-rw---- 1 root disk 202,  2 Mar 30 05:50 \/dev\/xvda2\nbrw-rw---- 1 root disk 202,  3 Mar 30 05:50 \/dev\/xvda3\nbrw-rw---- 1 root disk 202, 16 Mar 30 05:50 \/dev\/xvdb\nip-10-0-1-22:\/home\/ec2-user $ lsblk\nNAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nxvda    202:0    0  10G  0 disk \n\u251c\u2500xvda1 202:1    0   2M  0 part \n\u251c\u2500xvda2 202:2    0  20M  0 part \/boot\/efi\n\u2514\u2500xvda3 202:3    0  10G  0 part \/\nxvdb    202:16   0  30G  0 disk \n<\/pre>\n<p>After a new partition was created on the second device and a file system was created it is now mounted at \/u02:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@ip-10-0-1-22:\/home\/postgres\/ [pg122] df -h | grep u02\n\/dev\/xvdb1       30G   63M   30G   1% \/u02\n<\/pre>\n<p>Initializing and starting the PostgreSQL cluster:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@ip-10-0-1-22:\/home\/postgres\/ [PG1] initdb -D \/u02\/pgdata\/PG1\npostgres@ip-10-0-1-22:\/home\/postgres\/ [PG1] pg_ctl -D \/u02\/pgdata\/PG1\/ start -l \/dev\/null\npostgres@ip-10-0-1-22:\/home\/postgres\/ [PG1] psql postgres\npsql (12.2)\nType \"help\" for help.\n\npostgres=# select version();\n                                      version                                       \n------------------------------------------------------------------------------------\n PostgreSQL 12.2 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux) 7.5.0, 64-bit\n(1 row)\n\npostgres=# \n<\/pre>\n<p>That&#8217;s our starting point. Let&#8217;s assume we already have an application installed consisting of a few objects and some data:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npostgres=# create schema my_app;\nCREATE SCHEMA\npostgres=# create table my_app.t1 ( a int, b text, c date );\nCREATE TABLE\npostgres=# create view my_app.v1 as select a,c from my_app.t1;\nCREATE VIEW\npostgres=# insert into my_app.t1 (a,b,c) select i, i::text, now() from generate_series(1,1000000) i;\nINSERT 0 1000000\n<\/pre>\n<p>Now we want to clone that for testing purposes, how can we do that? The first step is to create a snapshot of the volume that holds the PostgreSQL cluster. To identify the EBS volume you can follow the link in the AWS console:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_2.jpg\" alt=\"\" width=\"1000\" height=\"336\" class=\"aligncenter size-full wp-image-38668\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_3.jpg\" alt=\"\" width=\"594\" height=\"253\" class=\"aligncenter size-full wp-image-38669\" \/><\/a><\/p>\n<p>Once you have identified and selected the EBS volume you can create a new snapshot:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_4.jpg\" alt=\"\" width=\"1060\" height=\"270\" class=\"aligncenter size-full wp-image-38670\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_5.jpg\" alt=\"\" width=\"1373\" height=\"572\" class=\"aligncenter size-full wp-image-38671\" \/><\/a><\/p>\n<p>Snapshots can be viewed under the Snapshots section:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_6.jpg\" alt=\"\" width=\"1000\" height=\"429\" class=\"aligncenter size-full wp-image-38672\" \/><\/a><\/p>\n<p>Using that snapshot you can spin up a new instance and reference the snapshot in the storage screen:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_7.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_7.jpg\" alt=\"\" width=\"1000\" height=\"268\" class=\"aligncenter size-full wp-image-38673\" \/><\/a><\/p>\n<p>Once the new instance is ready all the files in PGDATA are there:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@ip-10-0-1-74:\/home\/postgres\/ [pg122] ls -la \/u02\/pgdata\/PG1\/\ntotal 64\ndrwx------ 20 postgres postgres  4096 Mar 30 06:46 .\ndrwx------  3 postgres postgres    17 Mar 30 06:44 ..\n-rw-------  1 postgres postgres     3 Mar 30 06:44 PG_VERSION\ndrwx------  6 postgres postgres    58 Mar 30 06:49 base\ndrwx------  2 postgres postgres  4096 Mar 30 06:46 global\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_commit_ts\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_dynshmem\n-rw-------  1 postgres postgres  4513 Mar 30 06:44 pg_hba.conf\n-rw-------  1 postgres postgres  1636 Mar 30 06:44 pg_ident.conf\ndrwxr-xr-x  2 postgres postgres     6 Mar 30 06:45 pg_log\ndrwx------  4 postgres postgres    68 Mar 30 06:53 pg_logical\ndrwx------  4 postgres postgres    36 Mar 30 06:44 pg_multixact\ndrwx------  2 postgres postgres    18 Mar 30 06:46 pg_notify\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_replslot\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_serial\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_snapshots\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_stat\ndrwx------  2 postgres postgres    63 Mar 30 07:00 pg_stat_tmp\ndrwx------  2 postgres postgres    18 Mar 30 06:44 pg_subtrans\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_tblspc\ndrwx------  2 postgres postgres     6 Mar 30 06:44 pg_twophase\ndrwx------  3 postgres postgres   188 Mar 30 06:53 pg_wal\ndrwx------  2 postgres postgres    18 Mar 30 06:44 pg_xact\n-rw-------  1 postgres postgres    88 Mar 30 06:44 postgresql.auto.conf\n-rw-------  1 postgres postgres 26599 Mar 30 06:44 postgresql.conf\n-rw-------  1 postgres postgres    70 Mar 30 06:46 postmaster.opts\n-rw-------  1 postgres postgres    81 Mar 30 06:46 postmaster.pid\n<\/pre>\n<p>Startup PostgreSQL and the new clone can be used for any purpose:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@ip-10-0-1-74:\/home\/postgres\/ [pg122] pg_ctl -D \/u02\/pgdata\/PG1\/ start\npostgres@ip-10-0-1-74:\/home\/postgres\/ [pg122] psql postgres\npsql (12.2)\nType \"help\" for help.\n\npostgres=# select count(*) from my_app.t1;\n  count  \n---------\n 1000000\n(1 row)\n<\/pre>\n<p>Quite easy and fast, especially when automated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you go for AWS EC2 instances to host your PostgreSQL deployments and you want to rapidly clone PostgreSQL instances for development or testing purposes you can make use of AWS EBS snapshots. In this post we&#8217;ll look at how you can quickly spin up EC2 instances that use these snapshots as a base for [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":13869,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1865,955,229],"tags":[133,135,1892,77],"type_dbi":[],"class_list":["post-13868","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-cloud","category-database-administration-monitoring","tag-aws","tag-cloud","tag-ebs","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Rapid PostgreSQL cloning using AWS EBS snapshots - dbi Blog<\/title>\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\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rapid PostgreSQL cloning using AWS EBS snapshots\" \/>\n<meta property=\"og:description\" content=\"When you go for AWS EC2 instances to host your PostgreSQL deployments and you want to rapidly clone PostgreSQL instances for development or testing purposes you can make use of AWS EBS snapshots. In this post we&#8217;ll look at how you can quickly spin up EC2 instances that use these snapshots as a base for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-30T12:50:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"189\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 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\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Rapid PostgreSQL cloning using AWS EBS snapshots\",\"datePublished\":\"2020-03-30T12:50:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\"},\"wordCount\":383,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\",\"keywords\":[\"AWS\",\"Cloud\",\"EBS\",\"PostgreSQL\"],\"articleSection\":[\"AWS\",\"Cloud\",\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\",\"name\":\"Rapid PostgreSQL cloning using AWS EBS snapshots - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\",\"datePublished\":\"2020-03-30T12:50:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg\",\"width\":1000,\"height\":189},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rapid PostgreSQL cloning using AWS EBS snapshots\"}]},{\"@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\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\/\/x.com\/westermanndanie\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Rapid PostgreSQL cloning using AWS EBS snapshots - dbi Blog","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\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/","og_locale":"en_US","og_type":"article","og_title":"Rapid PostgreSQL cloning using AWS EBS snapshots","og_description":"When you go for AWS EC2 instances to host your PostgreSQL deployments and you want to rapidly clone PostgreSQL instances for development or testing purposes you can make use of AWS EBS snapshots. In this post we&#8217;ll look at how you can quickly spin up EC2 instances that use these snapshots as a base for [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/","og_site_name":"dbi Blog","article_published_time":"2020-03-30T12:50:10+00:00","og_image":[{"width":1000,"height":189,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg","type":"image\/jpeg"}],"author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Rapid PostgreSQL cloning using AWS EBS snapshots","datePublished":"2020-03-30T12:50:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/"},"wordCount":383,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg","keywords":["AWS","Cloud","EBS","PostgreSQL"],"articleSection":["AWS","Cloud","Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/","url":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/","name":"Rapid PostgreSQL cloning using AWS EBS snapshots - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg","datePublished":"2020-03-30T12:50:10+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_ebs_1.jpg","width":1000,"height":189},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/rapid-postgresql-cloning-using-aws-ebs-snapshots\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Rapid PostgreSQL cloning using AWS EBS snapshots"}]},{"@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\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/13868","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=13868"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/13868\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/13869"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=13868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=13868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=13868"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=13868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}