[zfs-discuss] Incremental snapshot cannot be received "cannot restore to XXXXX: destination already exists"
phil.harman at gmail.com
Mon Dec 11 12:41:02 EST 2017
It doesn’t work because the snapshot already exists AND it is needed for the incremental receive to work.
I suspect the blogger didn’t test their example. But in any case, the rename approach is rather clumsy.
Better solutions generally include date and time in the snapshot name, so there’s no need to rename anything, and it’s much easier to know exactly what you’re sending (and what is required to receive it).
It’s a very simple matter to find the “newest common snapshot” between sender and receiver (when deciding what to send and what not to destroy).
> On 11 Dec 2017, at 15:40, explosive <explosive.tom at gmail.com> wrote:
> Thanks Phil, renaming both the source and destination snapshots has made it work.
> Can you explain why I need to rename the snapshot on the usb drive as well? The tutorials that I found only seem to show the source snapshot being renamed. (e.g. https://bipedu.wordpress.com/2015/12/24/incremental-backup-of-freenas-zfs-volume-on-external-drive/)
>> On 9 December 2017 at 12:13, Phil Harman <phil.harman at gmail.com> wrote:
>> Your initial receive created backup_usb_2tb_1/audio at usb_backup. You need to rename that too before the incremental receive will work.
>> > On 9 Dec 2017, at 11:38, explosive via zfs-discuss <zfs-discuss at list.zfsonlinux.org> wrote:
>> > Hi,
>> > I have a zfs pool (named "marvin") on my home server. I want to send individual snapshots of various volumes from marvin to a USB external drive that I have created as a pool ("backup_usb_2tb_1").
>> > I have create snapshots and sent them to the usb drive as so:
>> > zfs snapshot marvin/audio at usb_backup
>> > zfs send marvin/audio at usb_backup | zfs receive -dF backup_usb_2tb_1
>> > which has created the snapshot on the backup pool as (backup_usb_2tb_1/audio at usb_backup)
>> > I have then renamed the snapshot on my main pool:
>> > zfs rename marvin/audio at usb_backup marvin/audio at usb_backup_old
>> > and tried to send the incremental changes:
>> > zfs send -i marvin/audio at usb_backup_old marvin/audio at usb_backup | zfs receive -Fd backup_usb_2tb_1
>> > but I get this error message: "cannot restore to backup_usb_2tb_1/audio at usb_backup: destination already exists"
>> > I have also tried without "-F" on zfs recv but I get the same message.
>> > Any ideas what I am doing wrong?
>> > Thanks,
>> > Tom
>> > _______________________________________________
>> > zfs-discuss mailing list
>> > zfs-discuss at list.zfsonlinux.org
>> > http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zfs-discuss