Mittwoch, 17. August 2016

Wdmycloud Tipps n Tricks

This Article is a Guide to disable Thumbnailer/Mediaserver for more ressources and a mostly very-responsive WebUI, (half)automatic Backups to USB-Disk and somewhat hidden Twonkysettingspage.

Disable Thumbnailer and mediaserver for Mycloud-Feature and get rid of the generated Files: 

Stop them:
/etc/init.d/wdmcserverd stop 
/etc/init.d/wdphotodbmergerd stop 
Prevent them from restarting*:
chmod 644 /etc/init.d/wdmcserverd 
chmod 644 /etc/init.d/wdphotodbmergerd 
Delete Mediadatabase:
cd /mnt/HD/HD_a2/ 
(make sure you're switched inside the right folder with the command "pwd" if unsure, then:)
rm -rf .wdmc 

Of course you can combine this as one command, but accidentially wiping something other could be very bad. Also you can disable Mycloud Features fully if you don't need them, or use vpn and samba/nfs shares for example.

(Half-)*automated Backup to external disk:

mkdir a folder on localdisk or usbdisk (should be /mnt/HD/HD_a2/ and /mnt/USB/USB1_b2/, if not change the script below accordingly) and create a file there with vi /usr/local/config/ and insert this file:

(because this blog breaks some lines into two: if theres no empty line in between insert as a single line, especially the rsync line.)

mkdir /mnt/USB/USB1_b2/rsyncbackup/ 

touch /mnt/USB/USB1_b2/rsyncbackup.running 

rsync -avR --no-perms --no-owner --no-group --delete /mnt/HD/HD_a2/ /mnt/USB/USB1_b2/rsyncbackup/ 

echo "completed at" >> /mnt/USB/USB1_b2/rsyncbackup.log 

date >> /mnt/USB/USB1_b2/rsyncbackup.log 

rm /mnt/USB/USB1_b2/rsyncbackup.running 

Now edit crontab for autostart. First Number (10) marks the minutes, second number (0) the hour. So 18:10 or 6:10pm would be "10 18 * * *"
crontab -e: 
10 0 * * * /usr/local/config/ >> /mnt/USB/USB1_b2/rsyncbackup.log 2>&1 

 You can also start it only once by making a crontab entry for the next minute and deleting it from crontab while running. Because the installed linux don't have screen/tmux and so you don't need to stay connected till the rsync is finished (2TB could take 20-30 hours) on first sync... next syncs would be only incremental. 

Access Twonkysettings and Previewpage on Port 9000.

With defaultsettings this is http://wdmycloud:9000/

More Tipps soon if i find out more.
(credits to for wdmediaserver idea)
*Service will start again and Crontab gets deleted at reboot, because / is a ramdisk image. (Maybe we can rebuild this, but it would be needed to rebuild after every update - and if the updates are binary patches to this file this would be very bad).

Keine Kommentare:

Kommentar veröffentlichen