{"id":3364,"date":"2012-09-02T14:31:40","date_gmt":"2012-09-02T06:31:40","guid":{"rendered":"http:\/\/jpuyy.com\/?p=3364"},"modified":"2012-11-05T10:19:14","modified_gmt":"2012-11-05T02:19:14","slug":"wordpress-backup-strategy","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=3364","title":{"rendered":"wordpress\u5907\u4efd\u7b56\u7565"},"content":{"rendered":"<p>\u53c2\u8003\uff1ahttp:\/\/codex.wordpress.org\/WordPress_Backups<\/p>\n<p>\u5907\u4efd\u7684\u65b9\u5f0f<\/p>\n<p><a href=\"http:\/\/jpuyy.com\/wp-content\/uploads\/2012\/09\/wordpress\u5907\u4efd.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4127\" title=\"wordpress\u5907\u4efd\" src=\"http:\/\/jpuyy.com\/wp-content\/uploads\/2012\/09\/wordpress\u5907\u4efd-300x232.jpeg\" alt=\"\" width=\"300\" height=\"232\" srcset=\"https:\/\/jpuyy.com\/wp-content\/uploads\/2012\/09\/wordpress\u5907\u4efd-300x232.jpeg 300w, https:\/\/jpuyy.com\/wp-content\/uploads\/2012\/09\/wordpress\u5907\u4efd-387x300.jpeg 387w, https:\/\/jpuyy.com\/wp-content\/uploads\/2012\/09\/wordpress\u5907\u4efd.jpeg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u6211\u81ea\u5df1\u7684\u65b9\u5f0f\u662f<\/p>\n<ul>\n<li>\u5c06\u7a0b\u5e8f\u6587\u4ef6\u653e\u5230bitbucket.org\u7684\u79c1\u6709\u5e93\u4e2d\u5b58\u653e<\/li>\n<li>\u6570\u636e\u5e93\u4f7f\u7528cron\u7684\u65b9\u5f0f\uff0c\u53c2\u8003\uff1a<a href=\"http:\/\/www.tamba2.org.uk\/wordpress\/cron\/\">http:\/\/www.tamba2.org.uk\/wordpress\/cron\/<\/a><\/li>\n<\/ul>\n<pre>#!\/bin\/bash\r\nDBNAME=wordpress\r\nDBPASS=root\r\nDBUSER=root\r\n#Keep the \" around your address\r\nEMAIL=\"jpuyy.com@gmail.com\"\r\n#Change the 'wp_' to match your table_prefix in the database\r\nmysqldump --opt -u $DBUSER -p$DBPASS $DBNAME &gt; backup.sql\r\ngzip backup.sql\r\nDATE=`date +%Y%m%d` ; mv backup.sql.gz $DBNAME-backup-$DATE.sql.gz\r\necho 'Blog Name: Your mySQL Backup is attached' | \/usr\/bin\/mutt $EMAIL -a $DBNAME-backup-$DATE.sql.gz -s \"MySQL Backup\"\r\nrm $DBNAME-backup-$DATE.sql.gz<\/pre>\n<p>\u8bb0\u5f55\uff1a\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\u57282012\u5e7410\u670831\u65e5yardvps\u6302\u6389\u6362linode\uff0c\u6062\u590d\u6210\u529f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\uff1ahttp:\/\/codex.wordpress.org\/WordPress_Backups \u5907\u4efd\u7684\u65b9\u5f0f \u6211\u81ea\u5df1\u7684\u65b9\u5f0f\u662f \u5c06\u7a0b\u5e8f\u6587\u4ef6\u653e\u5230bitbucket.org\u7684\u79c1\u6709\u5e93\u4e2d\u5b58\u653e \u6570\u636e\u5e93\u4f7f\u7528cron\u7684\u65b9\u5f0f\uff0c\u53c2\u8003\uff1ahttp:\/\/www.tamba2.org.uk\/wordpress\/cron\/ #!\/bin\/bash DBNAME=wordpress DBPASS=root DBUSER=root #Keep the &#8221; around your address EMAIL=&#8221;jpuyy.com@gmail.com&#8221; #Change the &#8216;wp_&#8217; to match your table_prefix in the database mysqldump &#8211;opt -u $DBUSER -p$DBPASS $DBNAME &gt; backup.sql gzip backup.sql DATE=`date +%Y%m%d` ; mv backup.sql.gz $DBNAME-backup-$DATE.sql.gz echo &#8216;Blog Name: Your mySQL Backup is attached&#8217; | \/usr\/bin\/mutt $EMAIL -a $DBNAME-backup-$DATE.sql.gz [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-3364","post","type-post","status-publish","format-standard","hentry","category-linux","tag-summary"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3364"}],"version-history":[{"count":9,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3364\/revisions"}],"predecessor-version":[{"id":4128,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/3364\/revisions\/4128"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}