RPort
Search…
⌃K
Links

Backing up the rport server

Perform regular backups

Backup script

Run the following script from cron to perform a backup of all relevant data needed to recover a rport server.
#!/bin/sh
# Backup the sqlite databases
cd /var/lib/rport
DBS=*.db
for DB in $DBS;do
echo $DB
sqlite3 $DB ".backup '$DB.backup'"
done
# Pack and compress everything
tar --exclude='*.db' \
-cvzf /var/backups/rportd-$(date +%Y-%m-%d-%H%M%S).tar.gz \
/var/lib/rport /etc/rport
Make sure you copy the created backup file to some remote file server.