{"id":76,"date":"2006-11-04T09:54:00","date_gmt":"2006-11-04T14:54:00","guid":{"rendered":"http:\/\/www.familytidings.com\/blog\/?p=76"},"modified":"2006-11-04T09:54:00","modified_gmt":"2006-11-04T14:54:00","slug":"remote-backup-using-ssh-and-tar","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=76","title":{"rendered":"Remote Backup Using SSH and TAR"},"content":{"rendered":"<p>I have one of those three-year free trial hosting accounts from <a href=\"http:\/\/www.1and1.com\">1&#038;1<\/a>.  It&#8217;s coming due at the end of the year and their documents say upgrading the account (that is, actually paying for it) requires the site be backed up and restored to a new account.  It&#8217;s annoying, but whether I do this or move to another host, the backup needs to be made just the same.  I have been backing it up manually by logging in to the account and making a TAR of the site, then transferring it to my local computer with FTP.  The problem is, the site has a 500MB limit and I&#8217;m using 400MB of it, so there isn&#8217;t room for the files and a compressed TAR backup.  SSH to the rescue!  I&#8217;ve found lots of sites that show you how to back up using SSH and TAR this way:<br \/><code>home$ ssh user@example.com<br \/>user@example.com's password: <br \/>example$ tar zcf - . | ssh user@home-machine.net \"cat > example.tgz\"<\/code><\/p>\n<p>If you can&#8217;t SSH to your local machine, you can do it this way:<br \/><code>home$ (ssh user@example.com tar czf - .) > example.tgz<br \/>user@example.com's password: <\/code><\/p>\n<p>The restore command is:<br \/><code>home$ cat example.tgz | (ssh user@example.com tar xzf -)<br \/>user@example.com's password: <\/code><\/p>\n<p>or to restore to a different location:<br \/><code>home$ cat example.tgz | (ssh user@example.com \"cd temp; tar xzf -\")<br \/>user@example.com's password: <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have one of those three-year free trial hosting accounts from 1&#038;1. It&#8217;s coming due at the end of the year and their documents say upgrading the account (that is, actually paying for it) requires the site be backed up and restored to a new account. It&#8217;s annoying, but whether I do this or move [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76"}],"version-history":[{"count":0,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}