Truenas Replication Error

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
Hi,
i have a problem with my replication Task. I have two Servers On the first is running a Nextcloud Plugin which I want to Backup on the second server. When I Start the Replication Task on Server one to create a backup on the second I got this error:

cannot open 'Nextcloud Backup': dataset does not exist.
Logs
[2021/01/14 06:26:55] INFO [Thread-20] [zettarepl.paramiko.replication_task__task_1] Connected (version 2.0, client OpenSSH_8.2-hpn14v15)
[2021/01/14 06:26:55] INFO [Thread-20] [zettarepl.paramiko.replication_task__task_1] Authentication (publickey) successful!
[2021/01/14 06:26:55] INFO [replication_task__task_1] [zettarepl.replication.run] No snapshots to send for replication task 'task_1' on dataset 'nextcloud'
[2021/01/14 06:26:55] ERROR [replication_task__task_1] [zettarepl.replication.run] For task 'task_1' unhandled replication error DatasetDoesNotExistException(1, "cannot open 'Nextcloud Backup': dataset does not exist\n")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/zettarepl/replication/run.py", line 154, in run_replication_tasks
run_replication_task_part(replication_task, source_dataset, src_context, dst_context, observer)
File "/usr/local/lib/python3.8/site-packages/zettarepl/replication/run.py", line 239, in run_replication_task_part
mount_dst_datasets(dst_context, target_dataset, replication_task.recursive)
File "/usr/local/lib/python3.8/site-packages/zettarepl/replication/run.py", line 674, in mount_dst_datasets
dst_datasets = list_datasets_with_properties(dst_context.shell, dst_dataset, recursive, {
File "/usr/local/lib/python3.8/site-packages/zettarepl/dataset/list.py", line 30, in list_datasets_with_properties
output = shell.exec(args)
File "/usr/local/lib/python3.8/site-packages/zettarepl/transport/zfscli/exception.py", line 29, in __exit__
raise DatasetDoesNotExistException(exc_val.returncode, exc_val.stdout) from None
zettarepl.transport.zfscli.exception.DatasetDoesNotExistException: cannot open 'Nextcloud Backup': dataset does not exist

can someone help me?

Best regards Leonard
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please post the complete configuration of your replication task.
 

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
this is my config

1610637729610.png

1610637753329.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
For source you should not pick the entire pool and the nextcloud/iocage dataset but just the latter - nextcloud/iocage - and check the "recursive" mark. Assuming you want to backup your jail and the data in it.

Second, does the target dataset exist? I have not tried if you can give the system a top level pool name as the target, but possibly not. Create a dataset named "backup" or similar on your second system and try to use that as the replication target.
 

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
where should I add the dataset? under mnt?

No I didnt think so then I cant add the pool to the plugins on the second server I get there an error.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, under /mnt/your-pool-name ... You need a target dataset in your pool.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Possibly you cannot have a space character in your pool name. Just guessing at the moment ...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
This is a new system, right? Destroy pool, create new.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Storage --> Pools --> Export/disconnect
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can use iocage as long as you never want to run a jail/plugin on that target system unless your main system fails.
The target dataset and all child datasets must remain in read-only state for the replication to work. In case your main system breaks you can manually remove the read-only property and then start your Nextcloud jail ...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
I startet the replication everything is working thank you! but as the task was done the second server doesnt show me the plugin
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Are the datasets all there? If yes, everything is fine. As I said you cannot run this as a plugin without breaking replication. This is not a high availability configuration but a backup.

You can try iocage activate poolname. If that does not work because of the read-only dataset, it should be possible to just replicate iocage/jails recursively into iocage/jails and leave the top-level iocage read-write.
 
Top