Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with rsync backup script

Featured Replies

Hello!


I am using this rsync script to backup to a USB drive: rsync -rtDz --delete /mnt/user/server/ /mnt/disks/Backup_Plus

When I run the script, I run it in the background so I can use Unraid still if necessary since the script will stop running otherwise if I close the window when its not running in the background.  But when I run it in the background the log doesn't contain any output from the script. So I never know if there were any problems or not. It just tells me when the script ran and then when it completed. Even if I download the log it is blank.

 

Are there any changes I could make to the script to make it actually output to the log file so I can see whats going on as it is running? And if this isn't possible, what other methods do you recommend for me to make a backup? I don't need it to be scheduled, I just run the script every few weeks and only connect the USB drive when I am doing a backup.

 

Thanks!

 

  • Community Expert

Install all the 'Unassigned Devices' plugins.  One of them has tmux as an installed component.  

 

If you invoke tmux in the WebGUI terminal and run the script in that terminal session, it will not terminate when the terminal is closed on your desktop.  It will continue to run even if you shut down your computer.  Google    tmux cheat sheet     to get quick instructions on its use. 

  • Author

Ok I will give it a try. Thank you for your response.

 

  • Author

I only saw three of them when I searched in Apps. Unassigned Devices, and Unassigned Devices Plus, both of which I already have. The Unassigned Devices Preclear looks like it is for setting up new drives. I searched for Tmux though and found a plugin for that. It is only a few weeks old. Should I just try that as a stand alone? Or is there another way of finding the Unassigned Devices one that you were talking about?

Edited by Prawcess

  • Community Expert

Open up the WebGUI terminal and type tmux on the command line.  If it is installed a tmux session will start.  It looks like this:

image.png.74f11a8e5a2e92ffb8a1c601261544e7.png

 

EDIT:  remember to google for a cheat sheet....

Edited by Frank1940

  • Community Expert
42 minutes ago, Prawcess said:

The Unassigned Devices Preclear looks like it is for setting up new drives.

That may be the one that itr is in because it is used to run the preclear script so that the user can shut down his client computer and not terminate the (often) multi day preclear operation!

You could also use user.scripts and run it in the background with a log:

Example:

 

rsync -avuXizhP --size-only --delete --stats --log-file=/mnt/cache/rsync_logs/sync_Video_to_Tower_`date +%Y-%m-%d_%H.%M`.log --backup --backup-dir=/mnt/user/rsync_backup_dir/Video_`date +%Y-%m-%d_%H.%M` /mnt/user/Video [email protected]:/mnt/user

  • Author

Thank you, you both were a big help. Frank1940: That Unassigned Devices Preclear had tmux in it. So now I can run the backup without the window disappearing. foo_fighter:  I used some of the other options you mentioned in your example script so I can see the output. Thank you both, it worked like a charm!

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.