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.

How to move, nightly, one directory tree and files?

Featured Replies

I've never really used mover as I haven't had a need for it really. I've read about it and it seems that it copies any and all information on the cache drive to the array. I have lots of stuff on the cache drive that I don't care to be copied. There is a lot of "appdata", VMs, etc... that are perfect where they are and definitely don't need moved, let along copied. I will create a backup of them once in a while if I feel necessary, but that's beside the point.

 

I have one particular folder that has subfolders and files that I'd like to move and I only want to move that one folder tree and that's it. It is currently for surveillance video footage. It'll fill up my SSD in a few days if I don't do this and I don't want it constantly writing to the array keeping the disks spun up all day long. This is just a temporary setup that I'm using before implementing a full on system just for surveillance. This system could be in place for 6 months to a year as I work through exactly how I want to do everything. Anyways, what's the best way to go about this??

 

I appreciate any input.

I setup this last week when I took one of my drives out of my cache pool, so I had only a second drive.  I use this two/three scripts in tandem to move files to the array when my cache drive gets to a certain limit.  It's a bit clunky, but it works

 

add diskmv script - I added it via custom scripts

 

- I then created custom diskmv commands to move files:

 

#!/bin/bash

echo "$(date "+%d.%m.%Y %T") INFO: moving downloads_import."

/boot/config/plugins/user.scripts/scripts/diskmv/script -f -v "/mnt/user/downloads_import" cache disk5
/boot/config/plugins/user.scripts/scripts/diskmv/script -f -v "/mnt/user/downloads_import" cache disk6

exit

I've added two disks just in case disk5 is full

 

- then use this script to set your min and max disk used thresholds - mine is set to run hourly and the script triggers the mover script above

 

#!/usr/bin/php

<?PHP

$min = 80;
$max = 100;

$diskTotal = disk_total_space("/mnt/cache");
$diskFree = disk_free_space("/mnt/cache");
$percentUsed = ($diskTotal - $diskFree) / $diskTotal * 100;

if (($min <= $percentUsed) and ($percentUsed <= $max)) {
  exec("/boot/config/plugins/user.scripts/scripts/diskmv_all/script");
}
?>

 

If this folder is actually a share then all you need to do is go to the share tab in the web UI click on the share and set ‘Use cache disk’ to ‘yes’.

 

This will invoke mover once a day (unless you change the default schedule) for this share and move the files from the cache drive to the array.

 

job done.

Edited by remotevisitor

  • Community Expert
42 minutes ago, live4soccer7 said:

I've read about it and it seems that it copies any and all information on the cache drive to the array.

You have apparently misunderstood what you read. Mover moves cache-yes user shares from cache to array, moves cache-prefer user shares from array to cache, and doesn't move anything else.

 

https://forums.unraid.net/topic/46802-faq-for-unraid-v6/?page=2#comment-537383

 

  • Author

Thanks for the info everyone! I'll need to read through it all and the links. I'm sure I'll have a question or two as well.

  • Author

So I've had a little time to take a look at the actual mover script on github. The condition is: shareUseCache="yes"

 

There are a few instances where a share can be setup to use the cache. There is ONLY, YES, PREFER

 

Can someone confirm that mover will only effect the if the share is set to YES and not the other two options? I just don't want it to move stuff that I'm not expecting as it would really mess me up.

  • Author

Disregard the above message. I started reading the link posted above and it appears it explains everything clear as day. I'll thoroughly look at that and post up if I need any clarification.

Edited by live4soccer7

Archived

This topic is now archived and is closed to further replies.

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.