After a reboot everything is reset - is this documented? how to people work around it?

I have been working with rsync and in the process found that after a re-start my scripts in /home/root were gone and any changes to config files were gone.  I found this referred to in an old post

http://community.wd.com/t5/WD-My-Cloud-EX4/rsync-make-ssh-settings-persistent/m-p/657455/highlight/true#M512

and the staff response at the time was “This is type of modifications are outside of the scope of support provided by WD.”

So I am just trying to understand what happens and come to terms with it.  Is there any documentation of what happens during a re-start?  There must be many users with backup scripts - how do you manage them?

Thanks.

1 Like

IIRC the sshd_config file is rebuilt on each restore (this is done to prevent people messing up the device).  If so it will use a template file from a source dircetory, so this would need to be modified.  

Let us know what you find. I haven’t had a look at this.

So it seems to me that all config files including passwd, group and others are reset, all files you may have created in /home or /etc or anywhere in the Linux system are gone – it’s like a factory reset of the Linux system.

So my first problem was I was creating shell scripts in /home/root and they would go.  So I decided to use /shares/ronb and keep things there.  Thats fine - these files persist.

Next I wanted this as the login directory for the sshd account, so edited /etc/passwd - but after a restart this edit was lost.  So for now I have a script /shares/ronb/init.sh that makes this change to /etc/passwd - and perhaps later will make other config changes.  Currently I just run init.sh manually after a restart - since restarts do not happen very often.  But later I may find a way to further automate this.

Do any of you have other approaches?

check /usr/local/config, that is where I notice they keep the current config files.

1 Like

I have this problem when I set up a ssh config and lost as soon as reboot the MyCLoud.
So, Do you have any update of this? and what is init.sh script?

The post by jebusx holds the key. The directory /usr/local/config has the files that are used to reset things on a reboot. So if you edited /etc/passwd to add a new account, then after a reboot it will be gone. But if you edit /usr/local/config/passwd and add a new account this will persist after reboots.

Back when I posted I was developing scripts to rsync directly from a MyCloud to a MyBook Duo without copying via my laptop.

Since then I have had the MyCloud fail and get replaced by WD so I had to backup as much as I could from the failing system and restore to the new one. I gave up trying to avoid the laptop and use scripts on the laptop based on the Windows robocopy command. This worked well enough, even if a bit slow, and if a long backup gets interrupted by a power glitch, robocopy picks up from where it left off.

So at the moment I am not using ssh for any serious administrative tasks.

@ronbali
Well noted!

I had install ssh authorized_keys & Goodsync gsftp for backup files, however it lost all goodsync config setting after reboot.

thanks you