{"id":513,"date":"2024-03-21T05:35:10","date_gmt":"2024-03-20T21:35:10","guid":{"rendered":"https:\/\/mmydonn.space\/?p=513"},"modified":"2024-03-26T09:59:12","modified_gmt":"2024-03-26T01:59:12","slug":"%e7%bb%99%e7%ab%99%e7%82%b9%e8%ae%be%e7%bd%ae%e6%95%b0%e6%8d%ae%e5%ba%93%e8%87%aa%e5%8a%a8%e5%a4%87%e4%bb%bd","status":"publish","type":"post","link":"https:\/\/mmydonn.space\/?p=513","title":{"rendered":"\u7ed9\u7ad9\u70b9\u8bbe\u7f6e\u6570\u636e\u5e93\u81ea\u52a8\u5907\u4efd"},"content":{"rendered":"<p>\u524d\u4e24\u5929\u770b\u5230\u200aFirefish\u200a\u53c8\u66f4\u65b0\u4e86\u5c0f\u7248\u672c\uff0c\u8fd9\u6b21\u6362\u4e86\u4e00\u4e2a\u5168\u6587\u641c\u7d22\u5f15\u64ce\u3002\u9274\u4e8e\u7ad9\u70b9\u641c\u7d22\u8868\u73b0\u4e00\u76f4\u5f88\u5dee\uff0c\u7ecf\u5e38\u9700\u8981\u5341\u51e0\u79d2\u6216\u8005\u5c31\u5e72\u8106\u62a5\u9519\uff0c\u4e8e\u662f\u8822\u8822\u6b32\u52a8\u6253\u7b97\u66f4\u65b0\u3002\u8f6c\u5ff5\u4e00\u60f3\u53d1\u73b0\u672c\u7ad9\u867d\u7136\u6709\u786c\u76d8\u200asnapshot\u200a\u5907\u4efd\uff0c\u4f46\u6570\u636e\u5e93\u6ca1\u6709\u88ab\u5305\u542b\u5728\u5185\uff0c\u6240\u4ee5\u51b3\u5b9a\u5148\u8bbe\u7f6e\u4e00\u4e2a\u53ef\u4ee5\u81ea\u52a8\u5907\u4efd\u7684\u6d41\u7a0b\uff0cpeace of mind\u3002\u7136\u540e\u75db\u82e6\u5c31\u5f00\u59cb\u4e86\u3002<\/p>\n<p><!--more--><\/p>\n<h5>Attempt 1<\/h5>\n<p>\u4e0a\u661f\u671f\u5728\u200aGithub\u200a\u4e0a\u5199\u4e86\u4e2a\u5c0f\u7a0b\u5e8f\uff0c\u4e8e\u662f\u5c31\u60f3\u5230\u80fd\u4e0d\u80fd\u8585\u200aGithub\u200a\u7684\u7f8a\u6bdb\u6765\u8fdb\u884c\u5907\u4efd\uff08\u6bd5\u7adf\u76f8\u5f53\u4e8e\u514d\u8d39\u50a8\u5b58\uff09\u3002<\/p>\n<p>\u9996\u5148\uff1a\u65b0\u5efa\u4e00\u4e2a\u79c1\u4eba\u4ed3\u5e93\uff0c\u914d\u7f6e\u200aSSH key\uff0c\u521d\u59cb\u5316\u6587\u4ef6\u5939\u3002\u5230\u8fd9\u4e00\u6b65\u90fd\u8fd8\u7b97\u987a\u5229\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u628a\u94fe\u63a5\u8bbe\u7f6e\u6210\u4e86\u200aHTTPS\u200a\u7684\uff08\u4ece\u200aLinux\u200a\u4e0a\u4f20\u5f53\u7136\u7528\u200aSSH\u200a\u66f4\u65b9\u4fbf\uff0c\u4e0d\u5982\u8bf4\u6211\u6ca1\u641e\u61c2\u600e\u4e48\u7528\u200aHTTPS\uff09\u3002\u63a5\u4e0b\u6765\u8ba9\u200aChatGPT\u200a\u7ed9\u6211\u5199\u4e86\u4e00\u4e2a\u53ef\u4ee5\u81ea\u52a8\u521b\u5efa\u5907\u4efd\u6587\u4ef6\u5e76\u81ea\u52a8\u200apush\u200a\u5230\u200aGithub\u200a\u7684\u811a\u672c\uff08\u81ea\u884c\u6dfb\u52a0\u4e86\u6d4b\u8bd5\u4ee3\u7801\uff09\uff1a<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n\n# Setting the date format for the filename\nDATE=$(date +%Y-%m-%d_%H-%M-%S)\n\n# Path where the backup will be saved\nBACKUP_DIR=&quot;\/path\/to\/backup\/directory&quot;\n\n# Database name to backup\nDB_NAME=&quot;your_database&quot;\n\n# Username to connect to the PostgreSQL database\nUSERNAME=&quot;postgres&quot;\n\n# Perform the backup\nsudo -u $USERNAME pg_dump $DB_NAME &gt; &quot;$BACKUP_DIR\/db_backup_$DATE.sql&quot;\n# Test code\n# touch $DATE.txt\n\n# Check if the dump was successful\nif [ $? -eq 0 ]; then\n  echo &quot;Backup was successful. Proceeding with Git commit...&quot;\n\n  # Navigate to the backup directory\n  cd &quot;$BACKUP_DIR&quot;\n\n  # Test code\n  # git add &quot;$DATE.txt&quot;\n\n  # Git operations\n  git add &quot;db_backup_$DATE.sql&quot;\n  git commit -m &quot;Database backup for $DATE&quot;\n  git push origin main\n\nelse\n  echo &quot;Backup failed. No changes committed to Git.&quot;\nfi<\/code><\/pre>\n<p>\u547d\u540d\u4e3a\u200a<code>pg_backup.sh<\/code>\u3002\u4fdd\u5b58\u540e\u8bb0\u5f97\u8fd0\u884c\u200a<code>chmod +x pg_backup.sh<\/code>\u200a\u4f7f\u4e4b\u6210\u4e3a\u53ef\u88ab\u8fd0\u884c\u7684\u811a\u672c\u3002<\/p>\n<p>\u8fd9\u4e2a\u811a\u672c\u53ef\u4ee5\u5b9e\u73b0\u6bcf\u6b21\u53ea\u4e0a\u4f20\u65b0\u589e\u7684\u5907\u4efd\u6587\u4ef6\uff0c\u800c\u4e0d\u5f71\u54cd\u5176\u4ed6\u6587\u4ef6\u3002E.g.\u200a\u5982\u679c\u6211\u4e4b\u540e\u5728\u672c\u5730\u5220\u9664\u5df2\u5b8c\u6210\u4e0a\u4f20\u7684\u6587\u4ef6\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5230\u200aGithub\u200a\u4e0a\u9762\u4fdd\u5b58\u7684\u6587\u4ef6\u3002\u7528\u7a7a\u767d\u200atxt\u200a\u6587\u4ef6\u65f6\u6d4b\u8bd5\u6beb\u65e0\u95ee\u9898\uff0c\u7136\u800c\u8fd0\u884c\u6b63\u5f0f\u4ee3\u7801\u65f6\u5c31\u62a5\u9519\uff1a<\/p>\n<pre><code class=\"language-bash\">remote: error: File db_backup_xx.sql is 2180.22 MB; this exceeds GitHub&#039;s file size limit of 100.00 MB\nremote: error: GH001: Large files detected. You may want to try Git Large File Storage - https:\/\/git-lfs.github.com.\nTo github.com:username\/backup.git<\/code><\/pre>\n<p>\u597d\uff0c\u6587\u4ef6\u592a\u5927\u662f\u5427\uff0c\u90a3\u6211\u5c31\u6765\u8bbe\u7f6e\u200a<code>git lfs<\/code>\u2026\u2026\u7ed3\u679c\u5e9f\u4e86\u8001\u9f3b\u5b50\u52b2\uff0c\u6298\u817e\u597d\u4e86\uff0c\u62a5\u9519\uff1a<\/p>\n<pre><code class=\"language-bash\">[xxxxxxxxxxxxxxxxxxxx] Size must be less than or equal to 2147483648: [422] Size must be less than or equal to 2147483648\nerror: failed to push some refs to &#039;github.com:username\/backup.git&#039;<\/code><\/pre>\n<p>\u554a\uff1f.jpg\u200a\u539f\u6765\u4f60\u53ea\u80fd\u63a5\u53d7\u200a2GB\u200a\u4ee5\u4e0b\u7684\u6587\u4ef6\u554a\uff01\u767d\u6298\u817e\u4e86\uff01\uff01\u6012\u5378\u8f7d\u200a<code>git lfs<\/code>\uff0c\u5220\u5e93\uff01<\/p>\n<h5>Attempt 2<\/h5>\n<p>\u53d1\u73b0\u200aGithub\u200a\u8fd9\u6761\u8def\u8d70\u4e0d\u901a\uff0c\u82e6\u601d\u51a5\u60f3\uff0c\u5982\u679c\u60f3\u514d\u8d39\u597d\u50cf\u53ea\u6709\u5546\u4e1a\u7f51\u76d8\u53ef\u4ee5\u7528\u7528\u3002\u4e8e\u662f\u6211\u518d\u6b21\u5bfb\u6c42\u200aChatGPT\u200a\u8001\u5e08\u7684\u5e2e\u52a9\uff0c\u8001\u5e08\u8a00\uff1a\u4f60\u7528\u200a<code>rclone<\/code>\u200a\u5427\uff01\u770b\u4e86\u770b\u652f\u6301\u7684\u7f51\u76d8\u5217\u8868\uff0c\u5fc3\u60f3\u7528\u200aGoogle Drive\u200a\u597d\u4e86\uff0c\u514d\u8d39\u200a15GB\uff0c\u8fd8\u633a\u591a\u7684\uff0c\u80fd\u88c5\u4e03\u4e2a\u5907\u4efd\u6587\u4ef6\u5427\u3002\u53c8\u5f00\u59cb\u542d\u54e7\u542d\u54e7\u88c5\u5305\uff0c\u88c5\u5b8c\u53d1\u73b0\uff1a\u4e0d\u5bf9\u554a\uff0c\u8fd9\u73a9\u610f\u513f\u6388\u6743\u8981\u5728\u6d4f\u89c8\u5668\u8fdb\u884c\uff0c\u6211\u7528\u200aVPS\u200a\u5f53\u7136\u6ca1\u6709\u56fe\u5f62\u754c\u9762\u53ef\u7528\u3002\u4e8e\u662f\u8fdb\u884c\u4e00\u901a\u641c\u7d22\u770b\u6709\u6ca1\u6709\u4ec0\u4e48\u65b9\u6cd5\u8bbe\u7f6e\u200aGoogle Drive\uff0c\u7136\u540e\u770b\u5230<a href=\"https:\/\/www.reddit.com\/r\/rclone\/comments\/12ujie2\/rclone_is_a_nightmare_with_google_drive\/\">\u8fd9\u7bc7\u5e16\u5b50<\/a>\uff0c\u53d1\u73b0\u200aGoogle Drive\u200a\u7684\u6388\u6743\u5f88\u6709\u53ef\u80fd\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\u8981\u91cd\u65b0\u8bbe\u7f6e\uff0c\u65e0\u6cd5\u5b9e\u73b0\u771f\u6b63\u7684\u5168\u81ea\u52a8\u5316\u3002\u6211\u8fc5\u901f\u6253\u8d77\u9000\u5802\u9f13\uff0c\u653e\u5f03\u8fd9\u6761\u8def\uff0c\u8fd8\u5f97\u5378\u8f7d\u200a<code>rclone<\/code>\u2026\u2026<\/p>\n<h5>Attempt 3<\/h5>\n<p>\u81f3\u6b64\u6211\u5bf9\u4e8e\u8585\u514d\u8d39\u7f8a\u6bdb\u7684\u60f3\u6cd5\u5df2\u7ecf\u88ab\u5404\u79cd\u5931\u8d25\u7684\u5c1d\u8bd5\u6253\u8d25\u4e86\uff0c\u8fd8\u662f\u8001\u8001\u5b9e\u5b9e\u4e0a\u200aobject storage\u200a\u5427\uff0c\u591a\u82b1\u70b9\u94b1\u4e5f\u5c31\u8ba4\u4e86\u3002\u521a\u597d\u6708\u521d\u6e05\u7406\u4e86\u7ad9\u70b9\u7684\u5a92\u4f53\u7f13\u5b58\u5e76\u76f4\u63a5\u5173\u6389\u4e86\u7f13\u5b58\uff0c\u6876\u5927\u5c0f\u4e00\u4e0b\u4ece\u200a155GB\u200a\u9aa4\u964d\u5230\u200a500MB\uff0c\u534a\u4e2a\u591a\u6708\u8fc7\u53bb\u6876\u5927\u5c0f\u589e\u957f\u5730\u975e\u5e38\u7f13\u6162\uff0c\u6bd5\u7adf\u672c\u7ad9\u6d3b\u8dc3\u7528\u6237\u672c\u6765\u5c31\u975e\u5e38\u5c11\u3002\u5c31\u7b97\u540c\u65f6\u4fdd\u5b58\u200a10\u200a\u4efd\u5907\u4efd\uff0c\u4e5f\u4e0d\u4f1a\u8d85\u8fc7\u200a25GB\uff0c\u8981\u4ed8\u7684\u94b1\u8fd8\u4e0d\u5982\u4e4b\u524d\u7f13\u5b58\u5a92\u4f53\u7684\u65f6\u5019\u591a\u3002\u597d\u5728\u200aVPS\u200a\u4e0a\u200a<code>aws<\/code>\u200a\u7684\u200aconfig\u200a\u65e9\u5728\u8bbe\u7f6e\u5a92\u4f53\u7684\u65f6\u5019\u5c31\u5df2\u7ecf\u641e\u597d\u4e86\uff0c\u4e0d\u9700\u8981\u518d\u7422\u78e8\u914d\u7f6e\u3002\u6211\u53c8\u53cc\u53d2\u53d5\u8f6c\u5411\u200aChatGPT\u200a\u8001\u5e08\uff1a\u5e2e\u6211\u5199\u4e00\u4e0b\u200aS3\u200a\u4e0a\u4f20\u6587\u4ef6\u7684\u547d\u4ee4\u5427\uff01\u8001\u5e08\u5b8c\u7f8e\u5730\u5b8c\u6210\u4e86\u4efb\u52a1\uff0c\u4fee\u6539\u540e\u7684\u811a\u672c\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n\n# Setting the date format for the filename\nDATE=$(date +%Y-%m-%d_%H-%M-%S)\n\n# Path where the backup will be saved\nBACKUP_DIR=&quot;\/home\/database-backup&quot;\n\n# Database name to backup\nDB_NAME=&quot;firefish&quot;\n\n# Username to connect to the PostgreSQL database\nUSERNAME=&quot;postgres&quot;\n\n# Perform the backup\ncd $BACKUP_DIR\nsudo -u $USERNAME pg_dump $DB_NAME &gt; &quot;$BACKUP_DIR\/db_backup_$DATE.sql&quot;\n# Test code\n# touch $DATE.txt\n\n# Check if the dump was successful\nif [ $? -eq 0 ]; then\n  ls\n  echo &quot;Backup was successful. Proceeding with uploading to Scaleway...&quot;\n\n  aws s3 cp \/home\/database-backup\/db_backup_$DATE.sql s3:\/\/user1\/backup\/db_backup_$DATE.sql --storage-class ONEZONE_IA --acl private --endpoint-url https:\/\/s3.your.endpoint\n  aws s3api put-object-tagging --bucket user1 --key backup\/db_backup_$DATE.sql --tagging &#039;{&quot;TagSet&quot;: [{ &quot;Key&quot;: &quot;type&quot;, &quot;Value&quot;: &quot;backup&quot; }]}&#039; --endpoint-url https:\/\/s3.your.endpoint\n\n# Test code\n# aws s3 cp \/home\/database-backup\/$DATE.txt s3:\/\/user1\/backup\/$DATE.txt --storage-class ONEZONE_IA --acl private\n# aws s3api put-object-tagging --bucket user1 --key backup\/$DATE.txt --tagging &#039;{&quot;TagSet&quot;: [{ &quot;Key&quot;: &quot;type&quot;, &quot;Value&quot;: &quot;backup&quot; }]}&#039;\n\n  echo &quot;Successfully uploaded backup file and set the tag.&quot;\n\n# rm $DATE.txt\n  rm db_backup_$DATE.sql\n  ls\n  echo &quot;Successfully deleted uploaded file.&quot;\n\nelse\n  echo &quot;Backup failed. No file is uploaded.&quot;\nfi<\/code><\/pre>\n<p>\u8fd9\u6b21\u6dfb\u52a0\u4e86\u4e0a\u4f20\u6210\u529f\u540e\u5220\u9664\u5907\u4efd\u6587\u4ef6\u7684\u547d\u4ee4\u4ee5\u8282\u7701\u200aVPS\u200a\u786c\u76d8\u7a7a\u95f4\uff0c\u8fd8\u6dfb\u52a0\u4e86\u989d\u5916\u7684\u200a<code>ls<\/code>\u200a\u6765\u5217\u51fa\u5f53\u524d\u76ee\u5f55\u4e0b\u6587\u4ef6\uff0c\u66f4\u76f4\u89c2\u5730\u786e\u8ba4\u64cd\u4f5c\u65e0\u8bef\u3002\u540c\u65f6\u5728\u4e0a\u4f20\u65f6\u8bbe\u7f6e\u597d\u50a8\u5b58\u7ea7\u522b\u53ca\u53ef\u89c1\u5ea6\uff0c\u5e76\u6dfb\u52a0\u200atag\u200a\u6765\u8fdb\u884c\u540e\u7eed\u7684\u200alifecycle\u200a\u7ba1\u7406\u3002\u8fd9\u56de\u811a\u672c\u5b8c\u7f8e\u5730\u8fd0\u884c\u4e86\u6d4b\u8bd5\u4ee3\u7801\uff0c\u6ca1\u6709\u4efb\u4f55\u62a5\u9519\uff0c\u771f\u662f\u975e\u5e38\u4ee4\u4eba\u611f\u52a8\u3002<\/p>\n<p>\u4e0d\u8fc7\u4e00\u5f00\u59cb\u8e29\u4e86\u4e00\u4e2a\u5751\u3002\u539f\u672c\u7684\u5907\u4efd\u8def\u5f84\u5728\u6211\u7684\u7528\u6237\u200ahome\u200a\u8def\u5f84\u4e0b\uff1a<code>\/home\/user1\/database-backup<\/code>\uff0c\u5bfc\u81f4\u6362\u56de\u5b9e\u9645\u5907\u4efd\u4ee3\u7801\u65f6\u603b\u662f\u4f1a\u62a5\u8fd9\u6837\u7684\u9519\uff1a<\/p>\n<pre><code class=\"language-bash\">could not change directory to &quot;\/home\/user1\/database-backup&quot;: Permission denied<\/code><\/pre>\n<p>\u539f\u56e0\u662f\u200a<code>postgres<\/code>\u200a\u7528\u6237\u5bf9\u6211\u5f53\u524d\u7528\u6237\u200a<code>user1<\/code>\u200a\u76ee\u5f55\u4e0b\u7684\u4efb\u4f55\u6587\u4ef6\u5939\u90fd\u6ca1\u6709\u5199\u5165\u6743\u9650\u3002\u4e8e\u662f\u628a\u5907\u4efd\u7684\u76ee\u5f55\u6362\u5230\u4e86\u200ahome\u200a\u76ee\u5f55\u4e0b\uff08<code>\/home\/database-backup<\/code>\uff09\uff0c\u5e76\u6388\u4e88\u6211\u7684\u7528\u6237\u548c\u200a<code>postgres<\/code>\u200a\u7528\u6237\u8bfb\u5199\u6743\u9650\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo setfacl -m u:user1:rwx \/home\/database-backup\nsudo setfacl -m u:postgres:rwx \/home\/database-backup<\/code><\/pre>\n<p>\u73b0\u5728\u518d\u8fd0\u884c\u7684\u65f6\u5019\u5c31\u4e0d\u4f1a\u62a5\u9519\u4e86\u3002\u7ec8\u4e8e\u6765\u5230\u4e86\u6700\u540e\u4e00\u6b65\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u65f6\u8fd0\u884c\u4e86\uff01<code>crontab -e<\/code>\u200a\u540e\u6dfb\u52a0\uff1a<\/p>\n<pre><code class=\"language-bash\">0 7 * * 1 \/home\/database-backup\/pg_backup.sh &gt; \/home\/database-backup\/log 2&gt;&amp;1<\/code><\/pre>\n<p>\u540e\u534a\u90e8\u5206\u662f\u200aChatGPT\u200a\u8001\u5e08\u5e2e\u6211\u6dfb\u52a0\u7684\u200alog\u200a\u9009\u9879\uff0c\u4fbf\u4e8e\u540e\u7eed\u67e5\u770b\u53ca\u200adebug\u3002\u8fd9\u4e2a\u811a\u672c\u5c06\u5728\u6bcf\u5468\u4e00\u7684\u65e9\u4e0a\u4e03\u70b9\u8fd0\u884c\uff0c\u56e0\u4e3a\u200aVPS\u200a\u548c\u6211\u4e0d\u5904\u4e8e\u4e00\u4e2a\u65f6\u533a\uff0c\u6240\u4ee5\u662f\u6211\u7684\u51cc\u6668\u4e09\u70b9\u3002\u5199\u5230\u8fd9\u91cc\u7a81\u7136\u60f3\u8d77\uff0c\u5176\u5b9e\u4e3a\u4e86\u6570\u636e\u5b8c\u6574\u6027\uff0c\u6700\u63a8\u8350\u7684\u505a\u6cd5\u5e94\u5f53\u662f\u505c\u6b62\u200aFirefish\u200a\u670d\u52a1\u540e\u518d\u8fdb\u884c\u5907\u4efd\uff0c\u4f46\u6211\u5b9e\u5728\u662f\u61d2\u5f97\u5f04\u4e86\uff0c\u5c31\u8fd9\u6837\u5427\uff08\u5fc3\u865a\uff09<\/p>\n<p>\u6700\u540e\u5728\u200aScaleway\u200a\u8bbe\u7f6e\u4e86\u6240\u6709\u5907\u4efd\u6587\u4ef6\u5728\u4e24\u5468\u540e\u88ab\u8f6c\u4e3a\u200aarchive\uff0c60\u200a\u5929\u540e\u5220\u9664\u3002\u6211\u60f3\u5e94\u8be5\u662f\u8db3\u591f\u591a\u7684\u5907\u4efd\u6587\u4ef6\u4e86\uff0c\u867d\u7136\u524d\u63d0\u662f\u8fd9\u4e2a\u5907\u4efd\u6587\u4ef6\u6ca1\u6709\u51fa\u4efb\u4f55\u95ee\u9898\uff0c\u53ef\u4ee5\u7528\u4e8e\u6062\u590d\u6570\u636e\u5e93\u2026\u2026\u81f3\u4e8e\u66f4\u65b0\u7248\u672c\u7684\u4e8b\u60c5\uff0c\u8fd8\u662f\u6539\u5929\u518d\u8bf4\u5427\u3002\u4e0b\u73ed\uff01<\/p>\n<h5>\u66f4\u65b0<\/h5>\n<p>\u8fd8\u662f\u8e29\u4e86\u522b\u7684\u5751\u3002\u9996\u5148\uff1a\u5982\u679c\u200a<code>crontab -e<\/code>\uff0c\u8bbe\u5b9a\u7684\u7a0b\u5e8f\u662f\u4ee5\u5f53\u524d\u7528\u6237\u8eab\u4efd\u6267\u884c\u3002\u7136\u800c\u56e0\u4e3a\u8fd9\u4e2a\u811a\u672c\u91cc\u542b\u6709\u200a<code>sudo<\/code>\u200a\u547d\u4ee4\uff0c\u5b9e\u9645\u8fd0\u884c\u65f6\u9700\u8981\u8f93\u5165\u5bc6\u7801\uff0c\u5b9a\u65f6\u8fd0\u884c\u4f1a\u62a5\u9519\u3002\u6709\u4e24\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff0c1\uff1a\u5728\u811a\u672c\u91cc\u76f4\u63a5\u5199\u5165\u5bc6\u7801\uff0c\u8fd9\u5f53\u7136\u6781\u5ea6\u6781\u5ea6\u4e0d\u63a8\u8350\uff0c\u975e\u5e38\u5371\u9669\uff1b2\uff1a\u8bbe\u7f6e\u65f6\u6267\u884c\u200a<code>sudo crontab -e<\/code>\uff0c\u4f7f\u7528\u200a<code>root<\/code>\u200a\u7528\u6237\u6267\u884c\u3002\u7136\u800c\u6211\u7684\u200a<code>root<\/code>\u200a\u7528\u6237\u6ca1\u6709\u914d\u7f6e\u8fc7\u200a<code>aws<\/code>\uff0c\u6240\u4ee5\u4e0a\u4f20\u7684\u65f6\u5019\u51fa\u9519\u4e86\u3002\u6574\u4e86\u534a\u5929\u4e5f\u6ca1\u628a\u200aendpoint\u200a\u8bbe\u7f6e\u5bf9\uff0c\u7528\u4e86\u597d\u51e0\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u751f\u6210\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u6ca1\u6709\u6210\u529f\uff0c\u6000\u7591\u4e00\u53f0\u673a\u5668\u53ea\u80fd\u751f\u6210\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff1f\uff1f\uff09\uff0c\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\uff08<a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-configure-endpoints.html\">\u547d\u4ee4\u4e0d\u5bf9<\/a>\uff0c\u653e\u5f03\u5bfb\u627e\u522b\u7684\u200areference\uff09\uff0c\u6240\u4ee5\u6700\u540e\u53ea\u597d\u4f7f\u7528\u200a<code>--endpoint-url<\/code>\u200a\u53c2\u6570\u628a\u200aurl\u200a\u76f4\u63a5\u5199\u5230\u811a\u672c\u91cc\u3002\u8bdd\u53c8\u8bf4\u56de\u6765\uff0c\u5982\u679c\u4f7f\u7528\u200a<code>root<\/code>\u200a\u7528\u6237\u6267\u884c\uff0c\u90a3\u5176\u5b9e\u6587\u4ef6\u5939\u8bfb\u5199\u4e4b\u7c7b\u6839\u672c\u5c31\u4e0d\u4f1a\u6709\u6743\u9650\u95ee\u9898\uff0c\u4e5f\u5c31\u662f\u4e0a\u9762\u8fd9\u6b65\u5176\u5b9e\u53ef\u4ee5\u5b8c\u5168\u7701\u7565\u3002\u603b\u4e4b\u8fd9\u56de\u7ec8\u4e8e\u53ef\u4ee5\u6210\u529f\u8fd0\u884c\u4e86\uff0c\u6b27\u8036\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e24\u5929\u770b\u5230\u200aFirefish\u200a\u53c8\u66f4\u65b0\u4e86\u5c0f\u7248\u672c\uff0c\u8fd9\u6b21\u6362\u4e86\u4e00\u4e2a\u5168\u6587\u641c\u7d22\u5f15\u64ce\u3002\u9274\u4e8e\u7ad9\u70b9\u641c\u7d22\u8868\u73b0\u4e00\u76f4\u5f88\u5dee\uff0c\u7ecf\u5e38\u9700\u8981\u5341\u51e0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-513","post","type-post","status-publish","format-standard","hentry","category-6"],"blocksy_meta":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/posts\/513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mmydonn.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=513"}],"version-history":[{"count":5,"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/posts\/513\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/mmydonn.space\/index.php?rest_route=\/wp\/v2\/posts\/513\/revisions\/518"}],"wp:attachment":[{"href":"https:\/\/mmydonn.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mmydonn.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mmydonn.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}