{"id":989,"date":"2025-09-10T18:00:00","date_gmt":"2025-09-10T09:00:00","guid":{"rendered":"https:\/\/blog.fundely.co.jp\/tech\/?p=989"},"modified":"2025-09-12T18:14:48","modified_gmt":"2025-09-12T09:14:48","slug":"ec2%e3%82%92%e7%94%a8%e3%81%84%e3%81%a6-dump-%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e3%83%aa%e3%82%b9%e3%83%88%e3%82%a2%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.fundely.co.jp\/tech\/2025\/09\/10\/ec2%e3%82%92%e7%94%a8%e3%81%84%e3%81%a6-dump-%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e3%83%aa%e3%82%b9%e3%83%88%e3%82%a2%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"EC2\u3092\u4f7f\u3063\u305fPostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u30a2\u624b\u9806"},"content":{"rendered":"\n<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u306e\u6c38\u91ce\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001EC2\u3092\u4f7f\u3063\u305fPostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u30a2\u624b\u9806\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4eca\u5f8c\u3001EC2\u3092\u7528\u3044\u3066PostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u3057\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092RDS\u4e0a\u306b\u4fdd\u5b58\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u3044\u3046\u65b9\u306e\u305f\u3081\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30a4\u30e1\u30fc\u30b8\u56f3\u3068\u884c\u3063\u305f\u3053\u3068<\/h3>\n\n\n\n<p>PostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u3092EC2\u4e0a\u3067\u30ea\u30b9\u30c8\u30a2\u3057\u3001RDS\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"783\" src=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2025\/09\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-09-04-19.51.21-1024x783.png\" alt=\"\" class=\"wp-image-991\" srcset=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2025\/09\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-09-04-19.51.21-1024x783.png 1024w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2025\/09\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-09-04-19.51.21-300x230.png 300w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2025\/09\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-09-04-19.51.21-768x588.png 768w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2025\/09\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-09-04-19.51.21.png 1124w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u307e\u305f\u3001\u30ea\u30b9\u30c8\u30a2\u306e\u5b9f\u884c\u624b\u9806\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2460 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3001SG\u306e\u4f5c\u6210<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2461 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306bSSH\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306eSSH\u30ad\u30fc\u306e\u4f5c\u6210<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2462 RDS DB\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3001SG\u306e\u4f5c\u6210<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2463 scp\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30ed\u30fc\u30ab\u30ebPC\u304b\u3089EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3078\u30b3\u30d4\u30fc<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2464 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306bpsql\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2465 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u3067\u3001\u30ea\u30b9\u30c8\u30a2\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u2466 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3057\u3001\u30ea\u30b9\u30c8\u30a2\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u306e\u78ba\u8a8d<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u2460\u301c\u2462\u306f\u3001AWS\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u3067\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u500b\u4eba\u7684\u306a\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u306f\u3001EC2\u304cRDS\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001RDS\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u8a31\u53ef\u8a2d\u5b9a\u306bEC2\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u305f\u3060\u3001\u4eca\u56de\u306f\u8aac\u660e\u3092\u7701\u7565\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001\u2463 \u4ee5\u964d\u306e\u5b9f\u884c\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<p>\u2463 \u306f\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5916\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<\/blockquote>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$ scp -i \/path\/to\/your-key.pem \/local\/path\/to\/file.txt ec2-user@ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com:\/home\/ec2-user\/<\/code><\/pre><\/div>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>i \/path\/to\/your-key.pem<\/code> \u2192 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u30ad\u30fc\u30da\u30a2\uff08\u79d8\u5bc6\u9375\uff09\u306e\u30d1\u30b9<\/li>\n\n\n\n<li><code>\/local\/path\/to\/file.txt<\/code> \u2192 \u30ed\u30fc\u30ab\u30ebPC\u306e\u8ee2\u9001\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9<\/li>\n\n\n\n<li><code>ec2-user@ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com<\/code> \u2192 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30d6\u30ea\u30c3\u30afDNS\uff08Amazon Linux\u306e\u5834\u5408\u3001\u30e6\u30fc\u30b6\u30fc\u306f <code>ec2-user<\/code>\uff09<\/li>\n\n\n\n<li><code>:\/home\/ec2-user\/<\/code> \u2192 EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5074\u306e\u4fdd\u5b58\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/li>\n<\/ul>\n\n\n\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u3001dump\u30d5\u30a1\u30a4\u30eb\u304c\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u6b21\u306b\u3001\u2464 \u4ee5\u964d\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u3067\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u306a\u306e\u3067\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30ed\u30fc\u30ab\u30ebPC\u304b\u3089EC2\u3078SSH\u63a5\u7d9a\u3057\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$ ssh -i &quot;dump-restore-key.pem&quot; ec2-user@ec2-xx-xxx-xxx-xx.ap-northeast-1.compute.amazonaws.com\n   ,     #_\n   ~\\\\_  ####_        Amazon Linux 2023\n  ~~  \\\\_#####\\\\\n  ~~     \\\\###|\n  ~~       \\\\#\/ ___   &lt;https:\/\/aws.amazon.com\/linux\/amazon-linux-2023&gt;\n   ~~       V~&#39; &#39;-&gt;\n    ~~~         \/\n      ~~._.   _\/\n         _\/ _\/\n       _\/m\/&#39;\n[ec2-user@ip-xx-x-x-xxx ~]$<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0a\u8a18\u753b\u9762\u304c\u51fa\u529b\u3055\u308c\u305f\u3089\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u5165\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001\u2464 \u3067\u3059\u304c\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u63a5\u7d9a\u3057\u3066\u3044\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066 <strong>PostgreSQL<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u3001\u8d77\u52d5\u76f4\u5f8c\u304b\u3089 psql \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br><br>\u3053\u306e\u51e6\u7406\u3092\u884c\u3046\u306b\u306f\u3001PostgreSQL \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3042\u308b <strong>psql \u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/strong> \u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u3001\u3053\u306e\u5f8c\u306f\u3001psql\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u3067EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u3001psql\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-x-x-xxx ~]$ which psql\n\/usr\/bin\/which: no psql in (\/home\/ec2-user\/.local\/bin:\/home\/ec2-user\/bin:\/usr\/local\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin)<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u4e0a\u8a18\u3088\u308a\u3001psql\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u305f\u306e\u3067\u3001\u3053\u306e\u5f8c\u306f psql \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002psql \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-x-x-xxx ~]$ sudo dnf install postgresql15<\/code><\/pre><\/div>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7d42\u3048\u305f\u5f8c\u3001which psql \u30b3\u30de\u30f3\u30c9\u3067\u3001\u30d1\u30b9\u8868\u793a\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u79c1\u306e\u5834\u5408\u3001which psql \u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\/usr\/bin\/psql \u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-x-x-xxx ~]$ which psql\n\/usr\/bin\/psql<\/code><\/pre><\/div>\n\n\n\n<p>\u307e\u305f\u3001\u3053\u306e\u5f8c \u2465 \u3067\u3001\u30ea\u30b9\u30c8\u30a2\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u304c\u3001\u5ff5\u306e\u70ba\u3001\u3053\u306e\u6642\u70b9\u3067EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089RDS\u3078\u63a5\u7d9a\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-xx-xx-xxx ~]$ psql --host=database-1.xxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com --port=5432 --dbname=postgres --username=postgres\nPassword for user postgres: \npsql (15.13, server 17.4)\nWARNING: psql major version 15, server major version 17.\n         Some psql features might not work.\nSSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)\nType &quot;help&quot; for help.<\/code><\/pre><\/div>\n\n\n\n<p>\u6b21\u306b\u3001\u4e0a\u8a18\u72b6\u614b\u304b\u3089 exit \u30b3\u30de\u30f3\u30c9\u3067\u629c\u3051\u3001\u518d\u3073EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u2465 \u3067\u3059\u304c\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u304c\u30ea\u30b9\u30c8\u30a2\u30b3\u30de\u30f3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-xx-xx-xxx ~]$ psql --host=database-1.xxxxxxxx.ap-northeast-1.rds.amazonaws.com \\\\\n     --port=5432 \\\\\n     --username=postgres \\\\\n     --dbname=postgres \\\\\n     -f ~\/xxxxxx.dump<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0a\u8a18\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30ea\u30b9\u30c8\u30a2\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6700\u5f8c\u306e \u2466 \u3068\u3057\u3066\u3001EC2\u304b\u3089RDS\u3078\u63a5\u7d9a\u3057\u3001\u30c6\u30fc\u30d6\u30eb\u3084\u30c7\u30fc\u30bf\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[ec2-user@ip-xx-x-x-xxx ~]$ psql --host=database-1.xxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com --username=postgres --dbname=postgres\npsql (15.13, server 17.4)\nWARNING: psql major version 15, server major version 17.\n         Some psql features might not work.\nSSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)\nType &quot;help&quot; for help.\n\npostgres=&gt; \\\\dt\n                          List of relations\n Schema |                   Name                   | Type  |  Owner   \n--------+------------------------------------------+-------+----------\n public | active_storage_attachments               | table | postgres\n public | active_storage_blobs                     | table | postgres\n public | analyst_reports                          | table | postgres\n public | api_keys                                 | table | postgres\n public | ar_internal_metadata                     | table | postgres\n public | attendance_details                       | table | postgres\n \n\n\u30fb\n\u30fb\n\u30fb\n\npostgres=&gt; SELECT * FROM active_storage_attachments LIMIT 5;\n id |    name    |       record_type        | record_id | blob_id |         created_at         \n----+------------+--------------------------+-----------+---------+----------------------------\n  xx | image      | Xxxxxxxxxxxxxxxxxxxxxxx  |       xx  |     xx  | 2024-12-05 xx:xx:xx.xxxxxx\n  xx | main_image | Xxxxxxxxxxxxxxxxxxxxxxx  |       xx  |     xx  | 2025-06-03 xx:xx:xx.xxxxxx\n(2 rows)\n<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0a\u8a18\u3088\u308a\u3001\u7121\u4e8b\u3001EC2\u5185\u3067 dump\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u3057\u3001RDS\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h3>\n\n\n\n<p>\u4eca\u56de\u3001EC2\u3092\u4f7f\u3063\u305fPostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u30a2\u624b\u9806\u3092\u7d39\u4ecb\u3044\u305f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u79c1\u304c\u601d\u3063\u3066\u3044\u305f\u3088\u308a\u3082\u7c21\u5358\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<\/blockquote>\n\n\n\n<p>\u4eca\u56de\u306e\u7d4c\u9a13\u3092\u3082\u3068\u306b\u3001\u4ed6\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3082\u3001\u4eca\u56de\u306e\u3088\u3046\u306a\u624b\u9806\u3067\u3001dump\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u3001\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:63px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u73fe\u5728\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u3067\u306f\u3001\u65b0\u3057\u3044\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u3066\u3044\u307e\u3059\u3002<br> \u5c11\u3057\u3067\u3082\u8208\u5473\u3092\u6301\u305f\u308c\u305f\u65b9\u306f\u3001\u305c\u3072\u3054\u5fdc\u52df\u304f\u3060\u3055\u3044\u3002<br>\u7686\u69d8\u304b\u3089\u306e\u3054\u5fdc\u52df\u3001\u5fc3\u3088\u308a\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button aligncenter is-style-fill\"><a class=\"wp-block-button__link has-vivid-green-cyan-background-color has-background wp-element-button\" href=\"https:\/\/blog.fundely.co.jp\/tech\/?page_id=82&amp;preview=true\" style=\"border-radius:12px\">\u52df\u96c6\u8981\u9805\u304a\u3088\u3073\u30a8\u30f3\u30c8\u30ea\u30fc\u30d5\u30a9\u30fc\u30e0<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u306e\u6c38\u91ce\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001EC2\u3092\u4f7f\u3063\u305fPostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u30a2\u624b\u9806\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002 \u4eca\u5f8c\u3001EC2\u3092\u7528\u3044\u3066PostgreSQL\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u3057\u3001\u305d\u306e\u30c7\u30fc [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33,34,35],"tags":[],"class_list":["post-989","post","type-post","status-publish","format-standard","hentry","category-aws","category-ec2","category-rds"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/comments?post=989"}],"version-history":[{"count":32,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/989\/revisions"}],"predecessor-version":[{"id":1029,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/989\/revisions\/1029"}],"wp:attachment":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/media?parent=989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/categories?post=989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/tags?post=989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}