zfs list -rt all zroot/ROOT
and you'll see what I mean.Dear shelLuser:Yes, and no... it doesn't actually back anything up, it merely freezes the state of your filesystem and stores any upcoming changes. Try:zfs list -rt all zroot/ROOT
and you'll see what I mean.
The reason why I don't consider this a 'real' backup is because it doesn't provide full on data protection. If the file system got damaged somehow then you'd lose access to both the file system itself and the snapshot(s); so essentially losing access to all your data.
That's not to say it doesn't provide any protection at all of course... if files get (accidentally) deleted then you'd always be able to retrieve those from the snapshot (see the /zroot/ROOT/default/.zfs folder).
Hope this can clear stuff up a bit.
Dear putney :No idea if this is the best way, but I use sysutils/zfsnap and sysutils/zxfer as described by SixFeetUp, sending backups to another FreeBSD system. I keep the 2nd system off-line except when I'm doing the zxfer, so that bit is done by hand rather than a cron job.
"Best" really is in the eye of the beholder so to speak; it depends on your needs and resources.could tell me how to full backup my system to some where ? what is the best way . thanks.
Dear putney :I'm not sure I understand.
A ZFS snapshot preserves the whole dataset - all of its files, all of each of those files. In turn, zfsnap snapshots all the system's datasets, so even if a h/w failure entirely destroyed the system, the latest snapshots that you will have sent to the 2nd machine will have everything from the state of the system at the time those snapshots were taken. If you don't have a 2nd machine, you can always do the zxfer to USB disk(s).
Dear shelLuser:"Best" really is in the eye of the beholder so to speak; it depends on your needs and resources.
Generally speaking a backup should always try to get data "off site"; so away from the server. A good way to do this is using zfs-send(8) (and receive): this can send a whole ZFS filesystem (or snapshot!) into a datastream which you could then store somewhere else. The only caveat is that you can only do a full restoration, so nothing on a per-file basis (of course you could restore the data into another location, then grab individual files from there).
receive subcommand Must also have the mount and create ability
See FreeBSD handbook, chapter 22.4.7.2. Sending Encrypted Backups over SSH , "On the receiving system:"when i used zfs send with ssh . meeting a problem. the ssh can't login with root. so zfs receive can't finish that step . how do you do when that stage ?
1. a computer use a normal user ssh b computer.
2. at a computer ,zfs send zroot/ROOT/default@2024y6m19d | ssh normaluser@192.168.122.1 \
Dear sirdice :Using zfs-allow(8) you can allow 'normaluser' to use zfs-receive(8).
Code:receive subcommand Must also have the mount and create ability
Dear T-daemon:See FreeBSD handbook, chapter 22.4.7.2. Sending Encrypted Backups over SSH , "On the receiving system:"
The user with the allowed ZFS administration permissions to ssh in is not specified. Example: ssh fff2024g@192.168.200.3game@notepad:~ $ zfs send -R systempool/usr/ports@test2025 | ssh 192.168.200.3 zfs recv -dvu syspool2/notepad_backup
Dear t-daemon :The user with the allowed ZFS administration permissions to ssh in is not specified. Example: ssh fff2024g@192.168.200.3
The -v switch works. You are not using it correctly if it shows nothing during a zfs send -v ... | zfs recv ...Using -v shows more details about the transfer, including the elapsed time and the amount of data transferred.
i have used -v , but nothing show . how to show the progress status ?
TAB=$(echo | tr '\n' '\t')
zfs snapshot -r tank@replica
size=$(zfs send -nP -R tank@replica | grep "^size" | sed -e "s/size[ $TAB]*//")
zfs send -R tank@replica | pv -s $size -ptebarT | ... | zfs receive -Fdu ...
dear bucky:The -v switch works. You are not using it correctly if it shows nothing during a zfs send -v ... | zfs recv ...
Experiment.
If this is a default menu guided Root-on-ZFS installed system, then the file system has the "compression=lz4" dataset property enabled:1. my systempool/usr/src@2025y4m14d was 0B ,refer size is 853Mb. what is real size about my snapshot ?
zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
systempool/usr/src@2025y4m14d 0B - 853M -
zfs get compress
(see zfsprops(7)).# du -sh /usr/src/.zfs/snapshot/2025y4m14d
# du -shA /usr/src/.zfs/snapshot/2025y4m14d
% du -sh /usr/src-main/.zfs/snapshot/250413
2.7G /usr/src-main/.zfs/snapshot/250413
% du -shA /usr/src-main/.zfs/snapshot/250413
3.3G /usr/src-main/.zfs/snapshot/250413
The value of 1.4GB results from a data stream send decompressed from a compressed file system. This is the default behavior when not overridden.2. when i transfer this snapshot to remote machine. that display i need to transfer 1.4GB to remote machine. what cause i need to transfer 1.4gb ? what content add it to this transfer process ?
-c, --compressed
that feature enabled as well. If the large_blocks feature is
enabled on the sending system but the -L option is not supplied in
conjunction with -c, then the data will be decompressed before
sending so it can be split into smaller block sizes. Streams sent
with -c will not have their data recompressed on the receiver side
using -o compress= value. The data will stay compressed as it was
from the sender. The new compression property will be set for
% zpool get feature@large_blocks
NAME PROPERTY VALUE SOURCE
zroot feature@large_blocks enabled local
I suspect the "snapdir" zfsprops(7) on the sending system can't be received because the user on the receiving system with the zfs-allow(8) administration permissions to receive the data stream on zroot/backup2025 dataset doesn't have the "snapdir" permission.cannot receive snapdir property on zroot/backup2025/usr/src: permission denied ###note : what happen to us ? please let me know
What does3.In the remote machine . i find below information
NAME USED AVAIL REFER MOUNTPOINT
zroot/backup2025 2.00G 4.49G 384K /zroot/backup2025
zroot/backup2025/usr 2.00G 4.49G 384K /zroot/backup2025/usr
zroot/backup2025/usr/src 2.00G 4.49G 2.00G /zroot/backup2025/usr/src
looks like the snapshot has been mounted.but , but why the snapshot used 2.0 GB ?
zfs list systempool/usr/src
on the sending system show?