Unruffled
Cadet
- Joined
- Feb 25, 2021
- Messages
- 4
I was looking for a way to backup my iSCSI LUN. There are couple of posts on the forum, but no clear answer as to how to do it. Then I found this post.
curtisshoward.com
The idea is to create a snapshot of the zvol, compress it to a .gz file, then back it up. I modified the script slightly to try stuff.
Then I would create a cron job that would look like this.
But there is no explanation on how to restore from a backup. What would be the command?
Backing Up an iSCSI Volume with ZFS | Curtiss Howard
The idea is to create a snapshot of the zvol, compress it to a .gz file, then back it up. I modified the script slightly to try stuff.
Code:
#!/bin/sh snapshot_name=$1@$(date +%Y-%m-%d) target=$2 echo "Creating snapshot $snapshot_name..." zfs snapshot $snapshot_name echo "Saving to $target" zfs send --verbose $snapshot_name | gzip > $target echo "Deleting snapshot..." zfs destroy $snapshot_name
Then I would create a cron job that would look like this.
/path/to/script.sh pool/path/to/zvol /path/to/file.gz
But there is no explanation on how to restore from a backup. What would be the command?