Anonymous

Changes

From NixNet
m
tweaks
= Installation =
Package The package is called <code>tarsnap</code> on most distributions and is usually included in the official repos. After installation, generate a key and associate it with your Tarnsap account using the following command.
<pre>
= Configuration =
The configuration file is usually stored in <code>/etc/tarsnap/tarsnap.conf</code>. You may need to copy the sample configuration to the production config before editing. This is what we use but make sure to look at the sample and read the manual before copying and pasting this.
<pre>
== Database dumps ==
Refer to [[SQL Snippets]] for working with more quick commands regarding SQL databases. Add a new user with a complicated password and lock/read-only minimal permissions to all databases with the following SQL command.
<pre>
grant lock tables,show view,select on *.* to 'archive'@'localhost' identified by 'CHANGEMETOSOMETHINGSECURE';
</pre>
We store this script scripts in <code>/usr/local/scripts</code> but you can put them wherever. This one is named <code>/usr/local/scripts/pre-acts.sh</code>. It simply dumps all databases to a backup SQL file for tarsnap to ingest.
<pre>
#!/bin/sh
find /root/db_dumps/ -type f -mtime +5 -delete
</pre>
 
Make sure these are marked as executable with <code>chmod +x /path/to/script.sh</code>.
== ACTS configuration ==
It ACTS can be installed by simply <code>wget</code>ing <code>acts</code> and <code>acts.conf.sample</code>directly from the repo. Alternatively, you can clone the whole repository and symlink <code>acts</code> to wherever you like for easier updates then copy <code>acts.conf.sample</code> to <code>/etc/acts.conf</code>. We store scripts in <code>/usr/local/scripts</code> but you can put them wherever.
Make sure you reference the sample configuration file but these are the base options we use. Add additional directories to the <code>backuptargets</code> line, omitting the preceding <code>/</code>. Until you run ACTS and verify that your configuration works properly, leave <code>verbose</code> set to 1. After you're sure everything works, set it to 0.
= Backups =
Yes, backups for the backups are necessary. Specifically, backups of tarsnap backup ''keys'' are necessary. If ; if you lose the key, you lose your backups. There is no way around this. While saving your key in a password manager, ina in a text file on your PC, one on someone else's PC(please don't ever do this), or even on another server are all possible potential solutions, it's also good to have an offline copy Just In Case™. We use [https://github.com/intra2net/paperbackup paperbackup] because it's easily read by both machines (QR codes) and humans (plain text). Run ; run your key through this, print the resulting PDF, put it in a folder, put the folder in a box, and put the box somewhere very very safe.