{"id":13845,"date":"2020-03-28T11:55:31","date_gmt":"2020-03-28T10:55:31","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/"},"modified":"2020-03-28T11:55:31","modified_gmt":"2020-03-28T10:55:31","slug":"using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/","title":{"rendered":"Using AWS Storage Gateway as a backup target for PostgreSQL &#8211; Cached volume gateway"},"content":{"rendered":"<p>In the <a href=\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql\/\" target=\"_blank\" rel=\"noopener noreferrer\">last post<\/a> we had a look on how you can use <a href=\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Storage Gateway<\/a> as File gateway to store your PostgreSQL backups safely offsite on <a href=\"https:\/\/aws.amazon.com\/s3\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS S3<\/a>. Another method of doing that would be to use &#8220;Cached Volume gateway&#8221; instead of the File gateway we used in the last post. The volume gateways does not provide access via NFS or SMB but does provide a volume over <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISCSI\" target=\"_blank\" rel=\"noopener noreferrer\">iSCSI<\/a> and the on-prem machines will directory work against the volumes. Let&#8217;s see how that works.<\/p>\n<p><!--more--><\/p>\n<p>The procedure for creating a Volume gateway is more or less the same as the procedure we used in the last post, except that we are now going for the &#8220;Volume gateway&#8221; instead of the &#8220;File gateway&#8221;:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\" alt=\"\" width=\"1000\" height=\"428\" class=\"aligncenter size-full wp-image-38608\" \/><\/a><\/p>\n<p>For setting up the EC2 instance you can refer to the <a href=\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql\/\" target=\"_blank\" rel=\"noopener noreferrer\">last post<\/a>, except that you&#8217;ll need two additional disks and not only one:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_2.jpg\" alt=\"\" width=\"1000\" height=\"410\" class=\"aligncenter size-full wp-image-38609\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_3.jpg\" alt=\"\" width=\"1000\" height=\"212\" class=\"aligncenter size-full wp-image-38610\" \/><\/a><\/p>\n<p>The first additional disk will be used as the cache and the second one will be used as the upload buffer. The upload buffer is used to upload the data encrypted to S3, check here for the <a href=\"https:\/\/docs.aws.amazon.com\/storagegateway\/latest\/userguide\/StorageGatewayConcepts.html\" target=\"_blank\" rel=\"noopener noreferrer\">concepts<\/a>.<\/p>\n<p>Make sure that you add the iSCSI initiator port to you incoming rules in the security group which is attached to the EC2 instance:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_4.png\" alt=\"\" width=\"1000\" height=\"102\" class=\"aligncenter size-full wp-image-38611\" \/><\/a><\/p>\n<p>Again we&#8217;ll go for public access as we want to use the volumes on a local VM.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_5.jpg\" alt=\"\" width=\"1000\" height=\"316\" class=\"aligncenter size-full wp-image-38613\" \/><\/a><\/p>\n<p>Connect to the gateway:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_6.jpg\" alt=\"\" width=\"1000\" height=\"294\" class=\"aligncenter size-full wp-image-38614\" \/><\/a><\/p>\n<p>Activate the gateway:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_7.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_7.jpg\" alt=\"\" width=\"1000\" height=\"490\" class=\"aligncenter size-full wp-image-38615\" \/><\/a><\/p>\n<p>Assign the disks for the cache and the upload buffer and go with the default for the next screens:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_8.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_8.jpg\" alt=\"\" width=\"1000\" height=\"378\" class=\"aligncenter size-full wp-image-38616\" \/><\/a><\/p>\n<p>Last time we created a file share and now we are going to create a volume:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_9.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_9.jpg\" alt=\"\" width=\"1000\" height=\"248\" class=\"aligncenter size-full wp-image-38617\" \/><\/a><\/p>\n<p>We are going for a brand new volume but we could have also used a snapshot as a base:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_10.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_10.jpg\" alt=\"\" width=\"601\" height=\"418\" class=\"aligncenter size-full wp-image-38618\" \/><\/a><\/p>\n<p>Specify the secrets:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_13.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_13.png\" alt=\"\" width=\"997\" height=\"318\" class=\"aligncenter size-full wp-image-38622\" \/><\/a><\/p>\n<p>You can find the initiator name on the local machine:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@centos8pg:\/home\/postgres\/ [pg13] cat \/etc\/iscsi\/initiatorname.iscsi \nInitiatorName=iqn.1994-05.com.redhat:3ff52ad95a75\n<\/pre>\n<p>&#8230; and the new volume is ready:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_12.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_12.jpg\" alt=\"\" width=\"1000\" height=\"260\" class=\"aligncenter size-full wp-image-38620\" \/><\/a><\/p>\n<p>Now we need to attach the volume to our local machine. First of all we need to install the required packages and then enable and start the service:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@centos8pg:\/home\/postgres\/ [pgdev] sudo dnf install -y iscsi-initiator-utils\npostgres@centos8pg:\/home\/postgres\/ [pgdev] sudo systemctl enable iscsid.service\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/iscsid.service \u2192 \/usr\/lib\/systemd\/system\/iscsid.service.\npostgres@centos8pg:\/home\/postgres\/ [pgdev] sudo systemctl start iscsid.service\npostgres@centos8pg:\/home\/postgres\/ [pgdev] sudo systemctl status iscsid.service\n\u25cf iscsid.service - Open-iSCSI\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/iscsid.service; enabled; vendor preset: disabled)\n   Active: active (running) since Fri 2020-03-27 14:18:04 CET; 3s ago\n     Docs: man:iscsid(8)\n           man:iscsiadm(8)\n Main PID: 5289 (iscsid)\n   Status: \"Ready to process requests\"\n    Tasks: 1\n   Memory: 3.6M\n   CGroup: \/system.slice\/iscsid.service\n           \u2514\u25005289 \/usr\/sbin\/iscsid -f\n\nMar 27 14:18:04 centos8pg systemd[1]: Starting Open-iSCSI...\nMar 27 14:18:04 centos8pg systemd[1]: Started Open-iSCSI.\n<\/pre>\n<p>Check that you are able to discover the target using the public IP address of the Storage Gateway EC2 instance:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@centos8pg:\/home\/postgres\/ [pgdev] sudo \/sbin\/iscsiadm --mode discovery --type sendtargets --portal xxx.xxx.xxx.xxx:3260\n10.0.1.159:3260,1 iqn.xxxx-xx.com.amazon:dwe-isci-target\n<\/pre>\n<p>When that is wokring fine you should configure CHAP authentication (using the secrets we deinfed above):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@centos8pg:\/home\/postgres\/ [pg13] sudo vi \/etc\/iscsi\/iscsid.conf \nnode.session.auth.authmethod = CHAP\n# To set a CHAP username and password for initiator\n# authentication by the target(s), uncomment the following lines:\nnode.session.auth.username = iqn.1994-05.com.redhat:3ff52ad95a75\nnode.session.auth.password = 123456789012\n# To set a CHAP username and password for target(s)\n# authentication by the initiator, uncomment the following lines:\nnode.session.auth.username_in = iqn.xxx-xx.com.amazon:dwe-isci-target\nnode.session.auth.password_in = 098765432109\n<\/pre>\n<p>And then the big surprise when you try to login to the target:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@centos8pg:\/home\/postgres\/ [pg13] sudo \/sbin\/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:dwe-isci-target --portal 10.0.1.159:3260,1 --login\nLogging in to [iface: default, target: iqn.1997-05.com.amazon:dwe-isci-target, portal: 10.0.1.159,3260]\niscsiadm: Could not login to [iface: default, target: iqn.1997-05.com.amazon:dwe-isci-target, portal: 10.0.1.159,3260].\niscsiadm: initiator reported error (8 - connection timed out)\niscsiadm: Could not log into all portals\n<\/pre>\n<p>That of course can not work from a local machine and the explanation is in the documentation:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_14-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_14-1.jpg\" alt=\"\" width=\"1000\" height=\"121\" class=\"aligncenter size-full wp-image-38624\" \/><\/a><\/p>\n<p>I&#8217;ve quickly started another EC2 instance, installed the same packages, enabled the iSCSI service and added the new intiator name to the CHAP configuration of the volume:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_15.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_15.png\" alt=\"\" width=\"998\" height=\"370\" class=\"aligncenter size-full wp-image-38625\" \/><\/a><\/p>\n<p>Trying to discover and to login again from the new ec2 host:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ip-10-0-1-252 ec2-user]# sudo \/sbin\/iscsiadm --mode discovery --type sendtargets --portal 10.0.1.159:3260\n10.0.1.159:3260,1 iqn.1997-05.com.amazon:dwe-isci-target\n[root@ip-10-0-1-252 ec2-user]# \/sbin\/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:dwe-isci-target --portal 10.0.1.159:3260,1 --login\nLogging in to [iface: default, target: iqn.1997-05.com.amazon:dwe-isci-target, portal: 10.0.1.159,3260] (multiple)\nLogin to [iface: default, target: iqn.1997-05.com.amazon:dwe-isci-target, portal: 10.0.1.159,3260] successful.\n<\/pre>\n<p>&#8230; and now it succeeds. You will see a successful connection also in the volume overview:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_16.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_16.jpg\" alt=\"\" width=\"1000\" height=\"272\" class=\"aligncenter size-full wp-image-38626\" \/><\/a><\/p>\n<p>You can also confirm that on the client:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ip-10-0-1-75 ec2-user]$ lsblk\nNAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda       8:0    0  50G  0 disk \nxvda    202:0    0  10G  0 disk \n|-xvda1 202:1    0   1M  0 part \n`-xvda2 202:2    0  10G  0 part \/\n[root@ip-10-0-1-75 ec2-user]$ ls -la \/dev\/sda*\nbrw-rw----. 1 root disk 8, 0 Mar 27 15:04 \/dev\/sda\n[root@ip-10-0-1-75 ec2-user]# \n[root@ip-10-0-1-75 ec2-user]$ fdisk -l \/dev\/sda\nDisk \/dev\/sda: 50 GiB, 53687091200 bytes, 104857600 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\n<\/pre>\n<p>Before you can put data on that block device their needs to be a file system on it and it needs to be mounted:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ip-10-0-1-75 ec2-user]$ parted \/dev\/sda mklabel msdos\nInformation: You may need to update \/etc\/fstab.\n[root@ip-10-0-1-75 ec2-user]$ parted -a opt \/dev\/sda mkpart primary xfs 0% 100%\nInformation: You may need to update \/etc\/fstab.\n[root@ip-10-0-1-75 ec2-user]$ ls -la \/dev\/sda*\nbrw-rw----. 1 root disk 8, 0 Mar 27 15:07 \/dev\/sda\nbrw-rw----. 1 root disk 8, 1 Mar 27 15:07 \/dev\/sda1\n[root@ip-10-0-1-75 ec2-user]$ mkfs.xfs \/dev\/sda1\nmeta-data=\/dev\/sda1              isize=512    agcount=4, agsize=3276736 blks\n         =                       sectsz=512   attr=2, projid32bit=1\n         =                       crc=1        finobt=1, sparse=1, rmapbt=0\n         =                       reflink=1\ndata     =                       bsize=4096   blocks=13106944, imaxpct=25\n         =                       sunit=0      swidth=0 blks\nnaming   =version 2              bsize=4096   ascii-ci=0, ftype=1\nlog      =internal log           bsize=4096   blocks=6399, version=2\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\n[root@ip-10-0-1-75 ec2-user]$ mount -t xfs \/dev\/sda1 \/var\/tmp\/sgw\/\n[root@ip-10-0-1-75 ec2-user]$ df -h | grep sgw\n\/dev\/sda1        50G  390M   50G   1% \/var\/tmp\/sgw\n<\/pre>\n<p>So now we have block device that is coming from the storage gateway. Let&#8217;s put some data on it and check the statistics in the AWS console:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ip-10-0-1-75 ec2-user]$ dd if=\/dev\/zero of=\/var\/tmp\/sgw\/ff1 bs=1M count=1000\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB, 1000 MiB) copied, 27.5495 s, 38.1 MB\/s\n<\/pre>\n<p>The statistics confirm that data is coming in:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_17.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_17.jpg\" alt=\"\" width=\"1000\" height=\"404\" class=\"aligncenter size-full wp-image-38629\" \/><\/a><\/p>\n<p>One downside of the volume gateway is, that you won&#8217;t see anything in the S3 overview. The benefits are, that you can make snapshots of the volumes and also clone them. From a pure PostgreSQL backup perspective I would probably use the file gateway but for other use cases like application servers a cached volume gateway might be the right thing to use if you want to extend your local storage to AWS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last post we had a look on how you can use AWS Storage Gateway as File gateway to store your PostgreSQL backups safely offsite on AWS S3. Another method of doing that would be to use &#8220;Cached Volume gateway&#8221; instead of the File gateway we used in the last post. The volume gateways [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":13846,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[133,135,77,1886],"type_dbi":[],"class_list":["post-13845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","tag-aws","tag-cloud","tag-postgresql","tag-storage-gateway"],"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>Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway - 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\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway\" \/>\n<meta property=\"og:description\" content=\"In the last post we had a look on how you can use AWS Storage Gateway as File gateway to store your PostgreSQL backups safely offsite on AWS S3. Another method of doing that would be to use &#8220;Cached Volume gateway&#8221; instead of the File gateway we used in the last post. The volume gateways [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-28T10:55:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"428\" \/>\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=\"6 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\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Using AWS Storage Gateway as a backup target for PostgreSQL &#8211; Cached volume gateway\",\"datePublished\":\"2020-03-28T10:55:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\"},\"wordCount\":613,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\",\"keywords\":[\"AWS\",\"Cloud\",\"PostgreSQL\",\"Storage Gateway\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\",\"name\":\"Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\",\"datePublished\":\"2020-03-28T10:55:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg\",\"width\":1000,\"height\":428},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using AWS Storage Gateway as a backup target for PostgreSQL &#8211; Cached volume gateway\"}]},{\"@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":"Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway - 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\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/","og_locale":"en_US","og_type":"article","og_title":"Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway","og_description":"In the last post we had a look on how you can use AWS Storage Gateway as File gateway to store your PostgreSQL backups safely offsite on AWS S3. Another method of doing that would be to use &#8220;Cached Volume gateway&#8221; instead of the File gateway we used in the last post. The volume gateways [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/","og_site_name":"dbi Blog","article_published_time":"2020-03-28T10:55:31+00:00","og_image":[{"width":1000,"height":428,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Using AWS Storage Gateway as a backup target for PostgreSQL &#8211; Cached volume gateway","datePublished":"2020-03-28T10:55:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/"},"wordCount":613,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg","keywords":["AWS","Cloud","PostgreSQL","Storage Gateway"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/","url":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/","name":"Using AWS Storage Gateway as a backup target for PostgreSQL - Cached volume gateway - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg","datePublished":"2020-03-28T10:55:31+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/aws_sgw_vgc_1.jpg","width":1000,"height":428},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/using-aws-storage-gateway-as-a-backup-target-for-postgresql-cached-volume-gateway\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using AWS Storage Gateway as a backup target for PostgreSQL &#8211; Cached volume gateway"}]},{"@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\/13845","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=13845"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/13845\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/13846"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=13845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=13845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=13845"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=13845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}