I needed to backup a Ubuntu virtual server from the cloud before I deleted it (it was replaced by a new server). The hosting service didn’t allow downloading backups etc. but I wanted to keep a copy for historical/auditing purposes (and in case I’d missed something building the new server).
ChatGPT told me about rsync so I used that from my Windows WSL instance to copy all the files and folders to my local system, then compressed that with tar.
rsync -avzP -e "ssh -p 22" user@remoteip:/ /mnt/m/Backups/backup --log-file=/mnt/m/Backups/rsync.log --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/tmp --exclude=/run --exclude=/mnt
cd /mnt/m/Backups
tar -czvf backup.2026_01_22.tar.gz backup/…
