I am trying to set up a home server. Here is how I’m planning to do it:
/dev/nvme0n1 SSD, Proxmox, VMs & CTs /dev/sda HDD, Media library /dev/sdb HDD, Backup
I’ve installed Proxmox on the NVMe SSD and created a few VMs and CTs to play with.
I have also partitioned /dev/sda and created a ZFS partition on /dev/sda1, made a pool /pool and a datastore /pool/data.
I plan to put media files on /pool/data, bind mount it on a container and run Jellyfin to serve them.
I can schedule backup jobs for the VMs and CTs themselves on Proxmox, but I’m not sure how to backup the media files on /pool/data to /dev/sdb.
-
How would one go about setting up such backups? Do I need to setup something like a cronjob with rsync or is there some easier ready-made solution? Ideally it’d be something like Proxmox’s VM backup jobs that let me prune and keep some copies daily / weekly / monthly / yearly.
-
What filesystem should I use for the backup drive / partition? Is there advantage of using ZFS to backup ZFS?
-
Can ZFS snapshots be used on /pool/data for additional protection? If so how do I set up, for example, automatic daily snapshots? Do snapshots take up little space if the files rarely change?
Thanks.
If the target is zfs, use zfs send. If the target is anything else, rsync.
Schedule it with cron.
Be aware that with zfs snapshots, you need to replay them to restore, which means you’ll periodically need to do a full backup. ClaraSystems has a number of guides on how to create zfs datasets to make efficient backups the way you want.