/ usr / local / bin / _backup
_backup
 1  #!/usr/bin/env bash
 2  
 3  # SPDX-License-Identifier: AGPL-3.0-or-later
 4  # SPDX-FileCopyrightText: 2025 Chris Barry <chris@barry.im>
 5  # _backup - backup configs using tarsnap
 6  
 7  set -e
 8  
 9  if [ $(whoami) != "root" ]; then
10  	echo "run with sudo" >&2
11  	exit 1;
12  fi
13  
14  t=$(date --iso-8601=seconds)
15  tarsnap -c -f "reseed.onion.im-${t}" \
16    /etc/letsencrypt/ \
17    /usr/local/share/reseed/ \
18    /opt/i2p/ \
19    /etc/i2pd/ \
20    /var/lib/i2pd \
21    /var/log/i2pd \
22    ;