Why don't you have a good, minimal backup solution? I've posted small, minimal scripts here a few of times that will do the job. Push backups (from the VPS to your home server) aren't too hard. No need to pay anything. Of course, "pull" backups are better, so when the VPS is hacked, you don't risk your home system too, but "pulling" takes a better understanding of ssh and client/server ideas. I use "pulled" backups for all my servers - local and on VPS. Setting up the ssh connection is the hard part and something you'd need to understand BEFORE doing the backups.
Of course, backups need to be run as root on both sides to maintain the metadata for every file (owner, group, permissions, ACLs, xattrs). Without the file metadata, you don't really have a backup. You have data that will manually need to be setup correctly.
I don't use Drupal. I have a few internal-only php webapps. These run on their own VM. Wallabag is one. Here's the backup part of my Wallabag VM backup (run from my backup server):
Code:
/usr/bin/sudo /usr/bin/rdiff-backup \
--exclude-sockets --exclude-device-files --exclude-fifos \
--exclude '**/.cache/mozilla' \
--exclude '**/.cache/chromium' \
--include "/usr/local" \
--include /etc \
--include /home \
--include /var/www/wallabag \
--include /root \
--exclude '**' \
$RUSER@$REMOTE::/ "$TGT"
# Remove older backups ....
echo "INFO: Removing backups older than $DAYS"
/usr/bin/sudo /usr/bin/rdiff-backup --remove-older-than "$DAYS" --force "$TGT"
You'll need to set the bash variables used above for your systems.
Of course, there are some pre-backup and post-backup things. I store some system information in /root/backups to make not just recovery easier, but to have a daily view of how things were configured - like lists of installed packages, disk layouts, etc. Sometimes, a partition table gets corrupted and that it. No data is at risk if you can just overlay the correct partition table, so having that data in a format that can be used to exactly match what was already there is helpful. I capture these things:
Code:
# ls /root/backup/
apt-mark.auto crontab.tf crontab.www-data inxi.txt lvs.txt vgs.txt
apt-mark.manual crontab.munin df.txt lsblk.txt parted.txt
blkid.txt crontab.root dpkg.list lshw.list pvs.txt
The filenames should be sufficient for what they contain.
If you have a DBMS, you'll want to stop it before and restart it after ... or dump the DB to a text backup file if you don't want to stop it. The best method would be to use a volume manager, create a snapshot of all the file systems you want to backup, then backup a read-only mount of the snapshot area. If you don't have a volume manager, you can't do that. But you can read more about it, it isn't difficult or hard, here: https://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html <--- looks like their cert expired recently. They will fix it soon, I'm certain. Lacking that, here's another how-to from a reputable source: https://www.tecmint.com/take-snapsho...estore-in-lvm/
Bookmarks