project-trident / trident-docs Public
Exporting and Importing a user dataset onto another machine
Pages 17
Table of Contents
General Information
Terminal-based Configuration
Graphical Configuration
ZFS References
- ZFS Snapshots and Pruning
- ZFS Send and Receive
- Exporting/Importing Datasets
- Moving Default Home Directory to a Separate Drive
General How-To's
Clone this wiki locally
Get dataset list
zfs list
Look for the dataset for your ~ directory. In this case it is:
trident/usr/home
Take note of the size of the dataset.
#Mount the external drive you're going to use In our case were are using a USB Stick. Make sure whatever drive you select is large enough for your dataset.
Fat32: sudo mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /media/usbstick
ExFat: sudo mount.exfat /dev/da0s1 /mnt/usbstick
NTFS: sudo ntfs-3g /dev/da0s1 /media/usbstick -o ro,uid=1001,gid=1001
create a snapshot
zfs snapshot -r trident/usr/home/@migration
Send to file
zfs send -R trident/usr/home@migration > /mnt/USBstick/tridenthomedir.zfs
Now the USB Stick contains a replica of your main_pool as it appeared at the moment when you took the snapshot. Take this over to the computer you wish to import your pool and plug in your external drive and mount it.
Receieve from file
You cannot be logged in as the user who's home directory you are importing.
This will completely overwrite the /usr/home directory. Any changes that were made previously, will need to be reapplied after you receive the older dataset.
zfs receive -F < tridenthomedir.zfs
#Reboot
sudo reboot
Quick Links
- Main Website: https://project-trident.org
- Sponsorships available! https://project-trident.org/sponsors
- Void Linux Documentation
- Void Linux Rosetta Stone: Dictionary of commands between different Linux distros.
- Void Linux FAQ