Stop Jobs
Stopping job (middlewared) that doesn’t have abort button or just stuck without going to OS level kill PID.
midclt call core.job_abort <JOB_ID>

RSYNC inside TMUX
Good for first time server to server rsync to have 2 live mirrored files, different from zfs replication.
This command runs on the destination server System > Shell. Alternatively, you can use another computer to SSH to the destination server first. Then use the command to pull from the target server to the destination server.
Does that make sense?
1. New tmux session so it won’t be terminated accidentally.
tmux new -s rsync_taskname
2. Run the rsync command.
# If truenas_admin has write perms to the destination:
rsync -avz --delete --progress --exclude '.zfs' truenas_admin@192.168.0.103:/mnt/PoolName/DatasetName/ /mnt/destinationPoolName/DatasetName/
# If truenas_admin needs sudo for write perms to the destination:
sudo rsync -avz --delete --progress --exclude '.zfs' truenas_admin@192.168.0.103:/mnt/PoolName/DatasetName/ /mnt/destinationPoolName/DatasetName/
Exclude .zfs snapshot, we don’t want to copy that to the destination server. Let the destination server handle the data snapshot itself.
3. If accidentally close the shell or terminal window, this is how to get back.
tmux ls
The command list all tmux session, in case your forgot the session task name you make at 1.
Then run the command below.
tmux attach -t rsync_taskname
0 Comments