Getting started with replication.

ZiggyGT

Contributor
Joined
Sep 25, 2017
Messages
125
I tried to set up replication to create a backup of the family photos and my curated TV/Movies. I use Truenas as the storage for my PLEX server and to back up my clients. My clients are mostly windows 10 or 11. Both the source and destination are mounted as SMB drives on the windows machines. This is just a local test. Trying to make it as simple as possible. Then I can add files and see how the snapshots work, and then go over the network. I don't quite understand the impact of the incremental snapshots on the files in the SMB share. The only successful snapshot was one where I just made a onetime copy when I built a new server.

I built a separate backup server (see my signature) and I want to make periodic backups from one server to the other. Even with my 10Gb network it takes forever to copy from one 7TB pool to another using the Windows SMB-SMB copy so I'd really like to get this to work. I know I'm doing something wrong, but I think I am doing what worked before. Please help me understand this feature and how I need to use it for periodic backups.

I have a pool called SSD and I am trying to back it up to a Pool called STRIPE. There is only one file is the SSD/VaultSSD. Both of these files

I have successfully done it once. But every time I try, I get an error like this.

Error​

cannot unmount '/mnt/Stripe/StripeVault': pool or dataset is busy
warning: cannot send 'SSD@auto-2023-08-10_22-22': Broken pipe.

Logs​

[2023/08/10 22:22:41] INFO [replication_task__task_6] [zettarepl.replication.pre_retention] Pre-retention destroying snapshots: []
[2023/08/10 22:22:41] INFO [replication_task__task_6] [zettarepl.replication.run] No snapshots to send for replication task 'task_6' on dataset 'SSD/VaultSSD'
[2023/08/10 22:22:41] INFO [replication_task__task_6] [zettarepl.replication.run] For replication task 'task_6': doing push from 'SSD' to 'Stripe/StripeVault' of snapshot='auto-2023-08-10_22-22' incremental_base=None receive_resume_token=None encryption=False
[2023/08/10 22:22:42] ERROR [replication_task__task_6] [zettarepl.replication.run] For task 'task_6' unhandled replication error ExecException(1, "cannot unmount '/mnt/Stripe/StripeVault': pool or dataset is busy\nwarning: cannot send 'SSD@auto-2023-08-10_22-22': Broken pipe\n")
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/run.py", line 181, in run_replication_tasks
retry_stuck_replication(
File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/stuck.py", line 18, in retry_stuck_replication
return func()
File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/run.py", line 182, in
... 9 more lines ...
File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/process_runner.py", line 33, in run
raise self.process_exception
File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/process_runner.py", line 37, in _wait_process
self.replication_process.wait()
File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/local.py", line 175, in wait
self.async_exec.wait()
File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/async_exec_tee.py", line 104, in wait
raise ExecException(exit_event.returncode, self.output)
zettarepl.transport.interface.ExecException: cannot unmount '/mnt/Stripe/StripeVault': pool or dataset is busy
warning: cannot send 'SSD@auto-2023-08-10_22-22': Broken pipe
 

NickF

Guru
Joined
Jun 12, 2014
Messages
763
[2023/08/10 22:22:41] INFO [replication_task__task_6] [zettarepl.replication.run] No snapshots to send for replication task 'task_6' on dataset 'SSD/VaultSSD'

Looks like you setup the replication job and tried to manually run it before the first snapshot was created. ZFS replication inherently depends on snapshots by the nature of how it's designed. So you will either need to make a snapshot following the naming convention SSD@auto-2023-08-10_22-22 or simply wait for the scheduled time.
 

ZiggyGT

Contributor
Joined
Sep 25, 2017
Messages
125
Looks like you setup the replication job and tried to manually run it before the first snapshot was created. ZFS replication inherently depends on snapshots by the nature of how it's designed. So you will either need to make a snapshot following the naming convention SSD@auto-2023-08-10_22-22 or simply wait for the scheduled time.
Before I ran the replication it told me there was no snapshot but it would create one. I thought that was the default.
I created a snapshot called "manual-2023-08-10_23-45". I cannot see how to make that the snapshot that one that is uses when I try to run it.
1691729844470.png
 

NickF

Guru
Joined
Jun 12, 2014
Messages
763
Unfortunately I can say that it does not. I'm not sure if this is intentional or a bug.

In any case, to manually make it work you have to use the naming schema that the replication task is expecting. Do what you just did and replace the word "manual" with the word "auto" without changing the suffix.
 

ZiggyGT

Contributor
Joined
Sep 25, 2017
Messages
125
Unfortunately I can say that it does not. I'm not sure if this is intentional or a bug.

In any case, to manually make it work you have to use the naming schema that the replication task is expecting. Do what you just did and replace the word "manual" with the word "auto" without changing the suffix.
OK. I created the format you suggested and the directory with the one file was replicated properly. SSD@auto-2023-08-11_00-41
I then added another file to SSD and the created a new snapshot SSD@auto-2023-08-11_00_55. I then ran the replication again but the new file did not show up and the last run snapshot still shows as SSD-auto-2023-08-11_00-41. How can I see what snapshots are available and how do I select them in the replication task. I am not understanding why it is not possible to select the snapshot that I want.
 
Last edited:
Top