[quick answers] ZFS Send backup

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
Hi,

I need help to backup esxistore and then send it over to backup001.

zfs snapshot -r Store2/EsxiStore@Snap001

zfs send -Rv -i Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01

freenas skit.PNG

I get this error

```log
root@freenas:/mnt # zfs send -Rv -i Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01/EsxiStore
missing snapshot argument
usage:
send [-DnPpRvLec] [-[iI] snapshot] <snapshot>
send [-Le] [-i snapshot|bookmark] <filesystem|volume|snapshot>
send [-nvPe] -t <receive_resume_token>

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow
cannot receive: failed to read from stream
```

```log
root@freenas:/mnt # zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT
Store2/EsxiStore@Snap001 112K - 4.38T -
freenas-boot/ROOT/11.1-U4@2017-10-19-23:52:46 13.6M - 973M -
freenas-boot/ROOT/11.1-U4@2018-01-29-14:17:07 13.6M - 973M -
freenas-boot/ROOT/11.1-U4@2018-04-30-14:27:28 1.11G - 1.11G -
```


I need to make an entire backup so that everything comes with it.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
It looks to me like you aren't typing the name of the target correctly...

BACKUP01/EsxiStore

versus

Backup001/EsxiStore

Case sensitive and needs to be all the characters to work.
 
Joined
Jul 3, 2015
Messages
926
Why not use the GUI? Snapshot your Store2/EsxiStore and then replicate to Remote host = localhost Remote ZFS Volume/Dataset = Backup001

You might want to delete the existing EsxiStore on Backup001 to avoid any conflict.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
It looks to me like you aren't typing the name of the target correctly...

BACKUP01/EsxiStore

versus

Backup001/EsxiStore

Case sensitive and needs to be all the characters to work.

It doesn't work either.
Code:
root@freenas:/mnt # zfs send -Rv -i Store2/EsxiStore@Snap001 | zfs receive -F Backup001/EsxiStore
missing snapshot argument
usage:
        send [-DnPpRvLec] [-[iI] snapshot] <snapshot>
        send [-Le] [-i snapshot|bookmark] <filesystem|volume|snapshot>
        send [-nvPe] -t <receive_resume_token>

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow
cannot receive: failed to read from stream


Why not use the GUI? Snapshot your Store2/EsxiStore and then replicate to Remote host = localhost Remote ZFS Volume/Dataset = Backup001

You might want to delete the existing EsxiStore on Backup001 to avoid any conflict.

freenas Snapshot.PNG

How to do it to backup001?

I'm afraid doing wrong doesn't want to lose any data.
 
Joined
Jul 3, 2015
Messages
926
Via the replication tab select localhost as the 'Remote hostname' and Backup001 as the 'Remote ZFS Volume/Dataset'.

I think you will need to delete the empty Backup001/EsxiStore dataset first, however.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
Via the replication tab select localhost as the 'Remote hostname' and Backup001 as the 'Remote ZFS Volume/Dataset'.

I think you will need to delete the empty Backup001/EsxiStore dataset first, however.

freenas replication.PNG


There won't be anything there.
 
Joined
Jul 3, 2015
Messages
926
You need to setup your snapshot schedule first.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
Joined
Jul 3, 2015
Messages
926
Take a look at your processes and see what’s running the hardest. Might be limited by sshd or lz4 compress on your CPU.
 
Joined
Jul 3, 2015
Messages
926

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
It doesn't work either.
You are using the -i switch, which is incremental, so you need to specify the original snapshot and then the latest one if you want to do it that way... if you mean to do the first snapshot (never done before), you will drop the -i and it will go as expected.

You can also continue down the path of using the replication job, but you should certainly turn off compression to do it internally on the same box... compression isn't helping. Also set the encryption to none as the information doesn't leave the box.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
You are using the -i switch, which is incremental, so you need to specify the original snapshot and then the latest one if you want to do it that way... if you mean to do the first snapshot (never done before), you will drop the -i and it will go as expected.

You can also continue down the path of using the replication job, but you should certainly turn off compression to do it internally on the same box... compression isn't helping. Also set the encryption to none as the information doesn't leave the box.

Do I use original snapshot or do you mean that the first snapshot takes longer than those that come later?

Can I turn off compression and encryption without stopping the transmission or will it continue?
 
Joined
Jul 3, 2015
Messages
926
No you’ll need to stop it and start again before you get the effect.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
No you’ll need to stop it and start again before you get the effect.

freenas replication 3.PNG


So I have to remove this and then redo it? Or can I just change?

Edit: If I remove it and then make a new one, will it start from 50% or start over?
 
Last edited:
Joined
Jul 3, 2015
Messages
926
I would remove make sure it’s stopped the process and then redo. It will need to start all over again as send and receive resume hasn’t quite arrived yet but if it’s 50% done then I’d just leave it.
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
I would remove make sure it’s stopped the process and then redo. It will need to start all over again as send and receive resume hasn’t quite arrived yet but if it’s 50% done then I’d just leave it.

Now it is at 71% so be waiting until it is finished. Thanks for all the help I will return if I get something wrong.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
Hi,

I need help to backup esxistore and then send it over to backup001.

zfs snapshot -r Store2/EsxiStore@Snap001

zfs send -Rv -i Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01

View attachment 30043

I get this error

```log
root@freenas:/mnt # zfs send -Rv -i Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01/EsxiStore
missing snapshot argument
usage:
send [-DnPpRvLec] [-[iI] snapshot] <snapshot>
send [-Le] [-i snapshot|bookmark] <filesystem|volume|snapshot>
send [-nvPe] -t <receive_resume_token>

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow
cannot receive: failed to read from stream
```

```log
root@freenas:/mnt # zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT
Store2/EsxiStore@Snap001 112K - 4.38T -
freenas-boot/ROOT/11.1-U4@2017-10-19-23:52:46 13.6M - 973M -
freenas-boot/ROOT/11.1-U4@2018-01-29-14:17:07 13.6M - 973M -
freenas-boot/ROOT/11.1-U4@2018-04-30-14:27:28 1.11G - 1.11G -
```


I need to make an entire backup so that everything comes with it.
The problem with your command is that you are using the "-i" option which stand for "Incremental", which means you need to provide the name of the two snapshots, one is the one last replicated on the remote and the last snapshot you want to update to.

The following command should have been enough:

zfs send -Rv Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01/EsxiStore
 

kikotte

Explorer
Joined
Oct 1, 2017
Messages
75
freenas replication 4.PNG

Now it is ready can I delete these without losing data?

The problem with your command is that you are using the "-i" option which stand for "Incremental", which means you need to provide the name of the two snapshots, one is the one last replicated on the remote and the last snapshot you want to update to.

The following command should have been enough:

zfs send -Rv Store2/EsxiStore@Snap001 | zfs receive -F BACKUP01/EsxiStore

Succeed in solving it in gui instead.
 
Joined
Jul 3, 2015
Messages
926
If the replication has finished and you don’t want to keep it incrementally backing up then sure you can just delete the snapshots.
 
Top