![]() ![]() However, if you for example take daily snapshots and only do the replication weekly, with -I you will also be able to go back to any of the daily snapshots when you do a restore. In both cases ( -i and -I) the destination pool contains complete replica of the main_pool at the time you took the snapshot. Zfs send -i snapshot1 snapshot2 will send the difference between those two snapshots, or you can use zfs send -I snapshot1 snapshot2 to also send all intermediary snapshots. You also do not need to rename the snapshots, but the example I gave you works nicely in a script as the names of the snapshots are always the same. Of course if you already have some snapshot schedule you can use those snapshots. Zfs destroy -r # get rid of the previous snapshotThis will only transfer the blocks that changed since the last replication. Zfs send -Ri | zfs receive -v USB_pool # incremental replication Zfs rename -r # rename the "old" snapshot Zfs send -R | zfs receive -vF USB_pool # transfer it over Now the USB_pool contains a replica of your main_pool as it appeared at the moment when you took the snapshot. What you are looking for is incremental replication. Of course you could destroy it, but that's far from optimal - you would need to copy the entire pool every time. The second time it would complain that the destination already contains a snapshot. However, even if you fix these problems it would still only work the first time. You also need to add the -F switch to zfs receive so that it doesn't complain that the target filesystem already exists. You are missing the snapshot names in the commands - the part after the sign. ![]() Click to expand.You should read the documentation on zfs send & receive :): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |