RPort
Search…
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.
1
#!/bin/sh
2
# Backup the sqlite databases
3
cd /var/lib/rport
4
DBS=*.db
5
for DB in $DBS;do
6
echo $DB
7
sqlite3 $DB ".backup '$DB.backup'"
8
done
9
# Pack and compress everything
10
tar --exclude='*.db' \ 
11
-cvzf /var/backups/rportd-$(date +%Y-%m-%d-%H%M%S).tar.gz \
12
/var/lib/rport /etc/rport
Copied!
Make sure you copy the created backup file to some remote file server.
Last modified 1mo ago
Export as PDF
Copy link