Chris's Wiki :: blog/sysadmin/SwapfileAndBackupsIssue Commentshttps://utcc.utoronto.ca/~cks/space/blog/sysadmin/SwapfileAndBackupsIssue?atomcommentsDWiki2022-11-12T00:45:21ZRecent comments in Chris's Wiki :: blog/sysadmin/SwapfileAndBackupsIssue.By db48x on /blog/sysadmin/SwapfileAndBackupsIssuetag:CSpace:blog/sysadmin/SwapfileAndBackupsIssue:01b5ef75768378dd43994c8bd45f5e7ad5497eebdb48xhttp://db48x.net/<div class="wikitext"><p>Or you could just use `chattr +d`.</p>
</div>2022-11-12T00:45:21ZBy Michael on /blog/sysadmin/SwapfileAndBackupsIssuetag:CSpace:blog/sysadmin/SwapfileAndBackupsIssue:34e8ef1d23a373526092fe39ce5ac68564c8121eMichael<div class="wikitext"><p>Or, adding further to Robert Earl's comment, place them in a distinct, clearly named directory and then exclude the contents of that directory wholesale from backups. For example, you could put swap files in <code>/swap</code> to future-proof the setup. (Need more swap? Just add one more file in the same place; no need to worry about how it will be handled during backups.)</p>
<p>Any setup that excludes swap files from all backups will need a little extra care during a bare-metal restore, of course, since the swap configuration will then point at a location that doesn't contain a swap file, but that seems like a manageable hurdle. It would have been a concern if the system had so little RAM that it couldn't even boot without swap, but that seems to me like an unlikely scenario these days even in highly resource-constrained but still general-purpose embedded systems.</p>
<p>And if the nodes are cattle, then it's a non-issue since you'd just have whatever process you use to spin up a new node set up swap as well, no different in principle from how it would have to be done with swap partitions in that case.</p>
</div>2022-11-11T09:10:53ZBy Robert Earl on /blog/sysadmin/SwapfileAndBackupsIssuetag:CSpace:blog/sysadmin/SwapfileAndBackupsIssue:780516a497f783202c1101321b3522edb502c185Robert Earl<div class="wikitext"><p>You could make a convention of naming them with a particular file extension or containing a string, and then they would be easy to exclude by Amanda or any other backup solution.</p>
</div>2022-11-11T04:29:03Z