aboutsummaryrefslogtreecommitdiff
path: root/build/posts/Website_Backups_with_Apple_iCloud
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-06-10 09:41:25 -0400
committerBradley Taunt <bt@btxx.org>2024-06-10 09:41:25 -0400
commit07e4a2dafe248280b5610f8c7d09b0f30b530f54 (patch)
tree8a145d1d4d07e1278a837ff15dadccc322d27515 /build/posts/Website_Backups_with_Apple_iCloud
parent16d28628aca9b2d356de31c319f5e7bc0f5b2b02 (diff)
Initial modifications to rebuilt only changed files based on mod date, performance updates
Diffstat (limited to 'build/posts/Website_Backups_with_Apple_iCloud')
-rw-r--r--build/posts/Website_Backups_with_Apple_iCloud/index.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/build/posts/Website_Backups_with_Apple_iCloud/index.html b/build/posts/Website_Backups_with_Apple_iCloud/index.html
new file mode 100644
index 0000000..a0bdf65
--- /dev/null
+++ b/build/posts/Website_Backups_with_Apple_iCloud/index.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="color-scheme" content="dark light">
+ <link rel="icon" href="data:,">
+ <title>Website Backups with Apple iCloud</title>
+ <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}blockquote{background:rgba(0,0,0,0.1);border-left:4px solid;padding-left:5px;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
+</head>
+
+<nav>
+ <a href="#menu">Menu &darr;</a>
+</nav>
+
+<main>
+<h1 id="website-backups-with-apple-icloud">Website Backups with Apple iCloud</h1>
+<p>2024-02-16</p>
+<p>My main work machine, an M2 MacBook Air, meshes really well with my iPhone SE (they are in the same ecosystem after all - duh!). Since both of these devices are Apple products, it makes sense that I pay for the optional iCloud service for extra storage. 50GB to be exact. I only need to bare minimum which costs just $1.68 a month, making this storage option cheaper than most cups of coffee these days.</p>
+<p>Recently I&#8217;ve been using iCloud as my &#8220;middle-man&#8221; backup system. I still have local, offline storage for most personal data but having additional off-site backups is never a bad thing. I make things easier for myself by taking advantage of <code>rsync</code>. You&#8217;ll need to make sure you have that program installed before trying this yourself:</p>
+<pre><code># This assumes you have homebrew installed first
+brew install rsync
+</code></pre>
+<p>Then, whenever I feel like backing up an existing project or website I simply run:</p>
+<pre><code>rsync -a user_name@ssh.webserver.domain:&#47;home&#47;var&#47;www&#47; &#47;Users&#47;username&#47;Library&#47;Mobile\ Documents&#47;com\~apple\~CloudDocs&#47;Backups&#47;site-backup
+</code></pre>
+<blockquote>
+<p>Note: The <code>-a</code> option tells <code>rsync</code> to sync directories recursively, transfer special and block devices, preserve symbolic links, modification times, groups, ownership, and permissions.</p>
+</blockquote>
+<p>The beautiful magic of <code>rsync</code>! Obviously, you&#8217;d want to properly name your directories (ie. <code>&#47;Backups&#47;site-backup</code>) for a cleaner structure and ensure that your iCloud directory is set correctly. (remember to read code before just copy-pasting!). With this approach you can backup entire server directories or be specific with each individual project folder. I would also recommend setting up some alias in your <code>.bashrc</code> or <code>.zshrc</code> etc. to make things more streamlined when running backups manually:</p>
+<pre><code>alias site-backup="rsync -a user_name@ssh.webserver.domain:&#47;home&#47;var&#47;www&#47; &#47;Users&#47;username&#47;Library&#47;Mobile\ Documents&#47;com\~apple\~CloudDocs&#47;Backups&#47;site-backup"
+# Then you simply run the following for a manual backup:
+site-backup
+</code></pre>
+<p>You can take this further by automating things via cron jobs, but for my use case that is a little overkill. Hopefully this helps anyone looking for a quick and dirty backup system, especially one that can piggyback of your existing iCloud that you might be paying for already.</p>
+<footer role="contentinfo">
+ <h2>Menu Navigation</h2>
+ <ul id="menu">
+ <li><a href="/">Home</a></li>
+ <li><a href="/projects">Projects</a></li>
+ <li><a href="/uses">Uses</a></li>
+ <li><a href="/wiki">Wiki</a></li>
+ <li><a href="/resume">Resume</a></li>
+ <li><a href="/colophon">Colophon</a></li>
+ <li><a href="/now">Now</a></li>
+ <li><a href="/donate">Donate</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li><a href="#top">&uarr; Top of the page</a></li>
+ </ul>
+ <small>
+ Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
+ Maintained with ♥ for the web. <br>
+ Proud supporter of <a href="https://usefathom.com/ref/DKHJVX">Fathom</a> &amp; <a href="https://nextdns.io/?from=74d3p3h8">NextDNS</a>. <br>
+ The content for this site is <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>.<br> The <a href="https://git.sr.ht/~bt/bt.ht">code for this site</a> is <a href="https://git.sr.ht/~bt/bt.ht/tree/master/item/LICENSE">MIT</a>.
+ </small>
+</footer> \ No newline at end of file