SNAP Plugin updated for unRAID Version 5.0


Recommended Posts

  • Replies 188
  • Created
  • Last Reply

Top Posters In This Topic

Can a hotPlugAfterShareEvent be triggered for a SNAP share drive being hot-plugged into a regular SATA port (that supports hot-swapping) or must it be an eSATA port?

 

I don't think UnRAID supports hot plugging sata devices.

 

Well it's interesting. Because it seems unRAID sort of does (though perhaps not totally).

 

I forgot when I upgraded my motherboard that SNAP hot-plug events were specified for only USB and eSATA. I just assumed that because the BIOS in my new board supports hot-plugging that I could connect the dock in my case to a regular SATA port and it would work the same, with SNAP still triggering an event. What I've actually found is that the drives do hot plug OK. That is, I can mount and share them with your SNAP GUI just fine. But so far I'm unable to get SNAP to do it automatically with a hotPlugAfterShareEvent.

 

What I'm wondering now, as the drives do work when hot-plugged to a regular (non-e) SATA port, is if it may be possible to modify SNAP to fully support them?

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

 

Yes it is.  I have a script that runs daily to backup some unRAID files to a backup drive.  You can use the same idea to copy files to the unRAID array.

 

This is what my script looks like.

#
# Perform daily backups.
#

LOGFILE=/var/log/DailyBackups
MOUNTPOINT=/mnt/disk/DailyBackups
PROG_NAME=DailyBackup

logger Started -t$PROG_NAME
echo "Started" > $LOGFILE

if [ -d $MOUNTPOINT ]
then
logger Daily Backup Drive Mounted -t$PROG_NAME
echo "Daily Backup Drive Mounted" > $LOGFILE
else
# Mount the DailyBackups drive
/boot/config/plugins/snap/snap.sh -m DailyBackups
fi

if [ -d $MOUNTPOINT ]
then
logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

logger Log File - DailyBackups  -t$PROG_NAME

logger Completed -t$PROG_NAME
echo "Completed" >> $LOGFILE

/boot/config/plugins/snap/snap.sh -MW DailyBackups
else
logger Daily Backup Drive Not Mounted -t$PROG_NAME
echo "Daily Backup Drive Not Mounted" > $LOGFILE
fi

 

I have the following line in my go file to copy the script to the daily cron directory.

cp /boot/custom/DailyBackups /etc/cron.daily

Link to comment

hello everyone.

 

i installed the plugin today and everything went totally fine!

 

I can accsess the shared folder and all but there is a problem im having with permissions and ownership of the new mounted drive.

 

the drive is set to read only and the owner is root:

 

I want to use the snap mounted HDD as Apps folder for SabNzbd and Sickbeard n such, but every chown or chmod command via telnet is not working.

 

please can anyboy help me out? its driving me insane....

 

THX

 

PS

 

im using these ...

 

 

chmod -R 777 /mnt/disk          for rw perms

 

and

 

chown -R nobody:users /mnt/disk        for owner

 

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

 

Yes it is.  I have a script that runs daily to backup some unRAID files to a backup drive.  You can use the same idea to copy files to the unRAID array.

 

This is what my script looks like.

#
# Perform daily backups.
#

LOGFILE=/var/log/DailyBackups
MOUNTPOINT=/mnt/disk/DailyBackups
PROG_NAME=DailyBackup

logger Started -t$PROG_NAME
echo "Started" > $LOGFILE

if [ -d $MOUNTPOINT ]
then
logger Daily Backup Drive Mounted -t$PROG_NAME
echo "Daily Backup Drive Mounted" > $LOGFILE
else
# Mount the DailyBackups drive
/boot/config/plugins/snap/snap.sh -m DailyBackups
fi

if [ -d $MOUNTPOINT ]
then
logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

logger Log File - DailyBackups  -t$PROG_NAME

logger Completed -t$PROG_NAME
echo "Completed" >> $LOGFILE

/boot/config/plugins/snap/snap.sh -MW DailyBackups
else
logger Daily Backup Drive Not Mounted -t$PROG_NAME
echo "Daily Backup Drive Not Mounted" > $LOGFILE
fi

 

I have the following line in my go file to copy the script to the daily cron directory.

cp /boot/custom/DailyBackups /etc/cron.daily

 

thanks for your reply!

 

i hope it not too much to ask for more details, like where to insert the script? and what to configure for this script to work...

 

hope for your support

 

shimon

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

 

Yes it is.  I have a script that runs daily to backup some unRAID files to a backup drive.  You can use the same idea to copy files to the unRAID array.

 

This is what my script looks like.

#
# Perform daily backups.
#

LOGFILE=/var/log/DailyBackups
MOUNTPOINT=/mnt/disk/DailyBackups
PROG_NAME=DailyBackup

logger Started -t$PROG_NAME
echo "Started" > $LOGFILE

if [ -d $MOUNTPOINT ]
then
logger Daily Backup Drive Mounted -t$PROG_NAME
echo "Daily Backup Drive Mounted" > $LOGFILE
else
# Mount the DailyBackups drive
/boot/config/plugins/snap/snap.sh -m DailyBackups
fi

if [ -d $MOUNTPOINT ]
then
logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

logger Log File - DailyBackups  -t$PROG_NAME

logger Completed -t$PROG_NAME
echo "Completed" >> $LOGFILE

/boot/config/plugins/snap/snap.sh -MW DailyBackups
else
logger Daily Backup Drive Not Mounted -t$PROG_NAME
echo "Daily Backup Drive Not Mounted" > $LOGFILE
fi

 

I have the following line in my go file to copy the script to the daily cron directory.

cp /boot/custom/DailyBackups /etc/cron.daily

 

thanks for your reply!

 

i hope it not too much to ask for more details, like where to insert the script? and what to configure for this script to work...

 

hope for your support

 

shimon

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

 

Yes it is.  I have a script that runs daily to backup some unRAID files to a backup drive.  You can use the same idea to copy files to the unRAID array.

 

This is what my script looks like.

#
# Perform daily backups.
#

LOGFILE=/var/log/DailyBackups
MOUNTPOINT=/mnt/disk/DailyBackups
PROG_NAME=DailyBackup

logger Started -t$PROG_NAME
echo "Started" > $LOGFILE

if [ -d $MOUNTPOINT ]
then
logger Daily Backup Drive Mounted -t$PROG_NAME
echo "Daily Backup Drive Mounted" > $LOGFILE
else
# Mount the DailyBackups drive
/boot/config/plugins/snap/snap.sh -m DailyBackups
fi

if [ -d $MOUNTPOINT ]
then
logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

logger Log File - DailyBackups  -t$PROG_NAME

logger Completed -t$PROG_NAME
echo "Completed" >> $LOGFILE

/boot/config/plugins/snap/snap.sh -MW DailyBackups
else
logger Daily Backup Drive Not Mounted -t$PROG_NAME
echo "Daily Backup Drive Not Mounted" > $LOGFILE
fi

 

I have the following line in my go file to copy the script to the daily cron directory.

cp /boot/custom/DailyBackups /etc/cron.daily

 

thanks for your reply!

 

i hope it not too much to ask for more details, like where to insert the script? and what to configure for this script to work...

 

hope for your support

 

shimon

There is really nothing to configure.  Edit the script for your needs.  The script should be on the flash drive.  I put it in the /boot/custom/ directory and copy it to the /etc/cron.daily directory when unRAID is started with this line in the go script:

 

cp /boot/custom/DailyBackups /etc/cron.daily

 

unRAID executes the script once a day.

Link to comment

hi guys,

 

is it possible to copy files from a snap share/drive to an unraid share periodically on the unraid box itself? like some sort of protected backup?

 

i know i can use the midnight commander but i want something automated...

 

i hope it's possible

 

thanks for your help

 

shimon

 

Yes it is.  I have a script that runs daily to backup some unRAID files to a backup drive.  You can use the same idea to copy files to the unRAID array.

 

This is what my script looks like.

#
# Perform daily backups.
#

LOGFILE=/var/log/DailyBackups
MOUNTPOINT=/mnt/disk/DailyBackups
PROG_NAME=DailyBackup

logger Started -t$PROG_NAME
echo "Started" > $LOGFILE

if [ -d $MOUNTPOINT ]
then
logger Daily Backup Drive Mounted -t$PROG_NAME
echo "Daily Backup Drive Mounted" > $LOGFILE
else
# Mount the DailyBackups drive
/boot/config/plugins/snap/snap.sh -m DailyBackups
fi

if [ -d $MOUNTPOINT ]
then
logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

logger Log File - DailyBackups  -t$PROG_NAME

logger Completed -t$PROG_NAME
echo "Completed" >> $LOGFILE

/boot/config/plugins/snap/snap.sh -MW DailyBackups
else
logger Daily Backup Drive Not Mounted -t$PROG_NAME
echo "Daily Backup Drive Not Mounted" > $LOGFILE
fi

 

I have the following line in my go file to copy the script to the daily cron directory.

cp /boot/custom/DailyBackups /etc/cron.daily

 

thanks for your reply!

 

i hope it not too much to ask for more details, like where to insert the script? and what to configure for this script to work...

 

hope for your support

 

shimon

There is really nothing to configure.  Edit the script for your needs.  The script should be on the flash drive.  I put it in the /boot/custom/ directory and copy it to the /etc/cron.daily directory when unRAID is started with this line in the go script:

 

cp /boot/custom/DailyBackups /etc/cron.daily

 

unRAID executes the script once a day.

 

sorry, but i dont know what file to edit or put the script in...

 

what is the go script you talk about?

 

i'm noob in linux and unraid plugins...

 

thanks for your patience

 

 

Link to comment

what is the go script you talk about?

Its on the FLASH drive, in the CONFIG folder, its called, 'go'. (not the go-safe file).

 

From your PC, be sure to use one of the free editors that is compatible with Linux scripting.

http://lime-technology.com/wiki/index.php/UnRAID_Topical_Index#Editors

 

 

(On my Mac, I use Textmate,  'notepad2' seems to be popular on PC's. )

(There's also an editor builtin to the unraid box console. Login and type in MC (for Midnight Commander) to get to a file browser. You'll see the editor function key on the bottom.  The path you want to follow is /boot/config/ and then down to the 'go' file.)

 

Link to comment
  • 2 weeks later...

If you want to mount a SNAP drive to use with a plugin, add the following to your go file:

 

/boot/config/plugins/snap/snap.sh -m ShareName

 

If you want to mount and share a SNAP drive, add the following to your go file:

 

/boot/config/plugins/snap/snap.sh -ms ShareName

 

"ShareName" is the share name you have assigned to the drive.

 

This will mount the SNAP drive before the plugins start.

Link to comment

I installed SNAP ver 5.19 with no issues on my new Unraid server Version 5.0.4.  Everything installed without a hitch, but when I try to access the directories on the mounted drive using snap I am getting denied permission to the drive.  I have read and reread the posts but I can't seem for the life of me to see where this was addressed when I know it was.  I gave up reading and decided to post this to see if there was a simple solution.  I am attaching a screen shot of the SNAP Shares and the error I get through my Windows machine.  Thanks and I hope I can get this to work.

Snap_Capture.jpg.03d5e981f9d0feef433206187f3d0524.jpg

Permissions_Capture.jpg.bf060e074dbe3ddd381b707abe03e44b.jpg

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.