What's a safe/persistent location for scripts ??


Recommended Posts

Can anyone please explain why I can can no longer find the script and associated files which I've just spent 2 days developing and testing, as root, and which were stored in & off /root.

I've been using putty to write a script, logged in as root, which was actually all done and tested, finito benito. I even had a backup, but not unfortunately a print-out or a remote copy of my script, which is as ironic as it was horrifying to discover, since it was a script to sync (rsync) my main server to my backup server, disk by disk. I can only assume this is due to me bouncing my server to replace a disk, but now my script and a subdirectory which I created in /root for my backups and logs are all missing/vanished.

a) what happened - I need to understand this so I can avoid this EVER happening again.

b) also, where should I store my scripts in future which can be run from cron but are persistent locations.

Thanks

Link to comment

unRAID OS resides completely in RAM. It is unpacked fresh from the flash drive each boot. The only locations that persist are /boot (the flash drive) and whatever disks and user shares you have in /mnt. People usually put scripts on flash since the disks are not mounted unless the array is started.

Link to comment

I created a command line plugin that includes shellinabox, a cli screenshot (shows unRAID stats) and backs up /root on shutdown and reboot. I don't even use shellinabox but do rely on the screenshot and root backup

 

Share?  :)

 

Thanks

Myk

It was originally just shellinabox but it's more than that now. http://lime-technology.com/forum/index.php?topic=42683.0

 

Edit: I use it mostly for /root/.ssh/authorized_keys. That way I don't have to log in to my server and bash history.

 

Link to comment

ok, i have the plugin installed - been using it for months and is great - but whats this cli screenshot thingie?

 

 

Myk

It's kind of a misnomer. I think it's called screenshot cause people take screenshots of their cli login. But basically I modified the screenfetch script for unRAID. It looks like this which you login to the command line through a terminal program.

uploadfromtaptalk1466254176357.jpg.c4987b84a8f193274745ba157fdd7973.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.