|
Post by werner on Oct 16, 2006 16:27:58 GMT 7
First of all an really great Site here , and i need two features to that great box, is there an way to make cronjobs, i wanna backup the complete thecus storage to an usb HDD by cron every day on an defined time so i have an external backup of my files this would be nice if there is an way, also I wanna make with the oneclick backup button to store the complete content from thecus to an usb hdd. Please help me with that i think it cant be that hard because linux is on the box Thx for your Help greats Werner
|
|
|
Post by N2100Owner on Oct 16, 2006 16:59:00 GMT 7
What if you have a different USB HDD connected to the YES Box, would you let the cronjob run?
|
|
|
Post by werner on Oct 16, 2006 17:47:16 GMT 7
wow what an fast answer ;-), my configuration will be as followed
Thecus: 2x 300GB Samsung SATA configured Raid1
2 x Usb HDD also with Samsung 300 GB HDD
i make then backups Mo, We, Fr ond USB HDD1 and Thu, Thur, Sat on USB HDD2
is there an way to make cronjobs for that and modify the oneclick backup?!?!
and yes the cronjob must run every day at 23:30 and at the morning i will replace the usb hdd with the second usb hdd
on an linux server my script in /usr/bin looks like that
mount /mnt/usb1 rsync -ua --delete /mnt/archiv /mnt/usb1 umount /mnt/usb1
|
|
|
Post by N2100Owner on Oct 16, 2006 19:08:12 GMT 7
I don't know how easy it is to modify default the oneclick backup function.
I think it is possible to write a module that copies the content of a share folder to a destination folder on user's demand. Anyone interested? ;D
|
|
|
Post by werner on Oct 16, 2006 19:46:23 GMT 7
please please ;-) or works cronjob that would be also enough or better it is more important!!!
|
|
|
Post by ktulaman on Oct 17, 2006 3:32:33 GMT 7
If you have ssh access to your N2100, it should be pretty straight forward to do what you wanted.
1. Be able to ssh as root to N2100.
2. Get a rsync binary that works on the N2100. I think any rsync binary compiled for Linux should work.
3. Transfer the rsync binary to, say, /raid/module/<directory_name>.
4. Put your backup shell script in /raid/module/<directory_name>.
5. Edit /app/cfg/crond.conf and put in the schedule for your cronjob that runs the backup shell script. The reason for adding the cronjob entry to this file is because on every reboot, the file is configured into the root cronjob. If you configure it in cron but not in this file, then on reboot, your cronjob entry will be gone.
6. Update cron for root by doing this:
cat /app/cfg/crond.conf | crontab - -u root
|
|
tyz
New Member
Posts: 21
|
Post by tyz on Oct 17, 2006 4:16:46 GMT 7
please please ;-) or works cronjob that would be also enough or better it is more important!!! Changing the function of the 1-click-copy button is easy. If you press the copy button, the script /app/bin/btn_copy is run. Just replace that script with your own version. All buttons are handled by /app/bin/btn_dispatcher. You could also map the power and reset button to your own script if you want to. Beware that stuff in /app/bin will get restored to the original situation after a reboot of your N2100. The cron daemon is already running, so adding your own entries should be really easy. Just run crontab -e, and enter the time when the script should run and the path to the script. Saving the output of crontab -l to /app/cfg/crond.conf will keep your changes after a reboot. I assume you're familiar with cron, because you seem to know of its existence Otherwise, here's an example of adding crontab entry The Easy Way (ie without crontab -e and the vi editor ) login with ssh, and enter this command: cp /app/cfg/crond.conf /app/cfg/crond.conf.bakthis will backup your current crontab now enter: cat >> /app/cfg/crond.confpaste the following into your ssh session, to append them to crond.conf: 30 23 * * Mon,Wed,Fri /raid/bin/btn_copy_usb1 30 23 * * Tue,Thu,Sat /raid/bin/btn_copy_usb2press the ctrl key + d now run the command crontab /app/cfg/crond.conf -u rootyour crontab will now be ready The above crontab example runs /raid/bin/btn_copy_usbX every evening at 23:30. Usb1 on mondays, wednesdays and fridays. The usb2 version on tuesdays, thursdays and saturdays. The backup should go to /raid/usbhdd/usb3/Y. Where Y is always 1 here. So I guess Y will be 2 when you add a second disk Ok, hope this info will help you a bit. And remember: all of the above instructions are entered at your own risk! ;D Mathijs
|
|
tyz
New Member
Posts: 21
|
Post by tyz on Oct 17, 2006 4:18:56 GMT 7
Ah, sorry. I didn't see this answer before I replied. Should've reloaded this page before hitting reply If you have ssh access to your N2100, it should be pretty straight forward to do what you wanted. 1. Be able to ssh as root to N2100. 2. Get a rsync binary that works on the N2100. I think any rsync binary compiled for Linux should work. 3. Transfer the rsync binary to, say, /raid/module/<directory_name>. 4. Put your backup shell script in /raid/module/<directory_name>. 5. Edit /app/cfg/crond.conf and put in the schedule for your cronjob that runs the backup shell script. The reason for adding the cronjob entry to this file is because on every reboot, the file is configured into the root cronjob. If you configure it in cron but not in this file, then on reboot, your cronjob entry will be gone. 6. Update cron for root by doing this: cat /app/cfg/crond.conf | crontab - -u root
|
|
|
Post by werner on Oct 17, 2006 14:46:27 GMT 7
Big thx to you all ;-) that makes thecus to an great server replacement thx for your help @all tyz: one Question still is there an way that the files in bin dont gets deleted after an reboot?!
|
|
|
Post by ryebank on Oct 18, 2006 5:49:58 GMT 7
You need to leave the stuff you want of the /raid/ path - this is your disks so should survive reboot - or if you create a module it allows for a script to be run on start that you can set to copy the files back to bin from /raid/ on startup
|
|
|
Post by werner on Oct 18, 2006 14:00:37 GMT 7
ok thx but i dont understand the module creating because what does the Thecus file and the install.rdf sorry but module creation is not what i can ;-( i´m on it and i can do the things to activate but i dont understand the module creating thing if anyone can help me then please help me ;-)
Thx cHarOn
|
|
|
Post by werner on Oct 18, 2006 22:06:33 GMT 7
Ok i modified the things but can now someone make an mod file from that file i dont know how to pack this correct and please take an look on what i modify, please let me know if it can work as i modifief the files ?!?! rapidshare.de/files/37216864/USB_Backup.zip.htmlthx
|
|
|
Post by ryebank on Oct 19, 2006 0:33:16 GMT 7
OK - I have to confess I haven't actually made a module myself - but have examined others - and the .mod file is actually just a renamed .tar archive with the files in specific folders and with some specific scripts - try renaming any of the modules you can get from Mikkel's (mshapf) site onbeat.dk/N2100/You can use something like ZipGenius (great little freeware Zip utility a bot like Winzip) on Win XP to browse the .tar's and you will see the basic structure is NAMEOFMOD/ <Thecus> Configure/ install.rdf license.txt Shell/ <uninstall.sh> <install.sh> module.rc enable.sh WWW/ index.htm In this lists items ending / are folders, items in < > are "standard" (i.e. borrow ones from another .mod) (the < > are not part of the real names) install.rdf is just an XML package details file (simple edit for yours) license.txt is what it sounds like - most mods seem to be a GNU one. module.rc is the main control of the mod and enable.rc is what runs when the module is enabled - you can easily update these with and script you need to run to recopy stuff for your scripts after reboots index.htm is the index page of your module's control - so you could e.g. have a lot more in WWW (images etc) and make it do stuff like set config options etc
|
|
|
Post by werner on Oct 19, 2006 2:57:56 GMT 7
i already looked into the mod file and i know the file structur but i am a little scarry to make it correct so i upload the modified file and want that someone who knows how to create an mod that he takes an look on it and then tell me what the correct build way is.
But thx for your anser ;-)
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Oct 19, 2006 13:14:15 GMT 7
making module is quite easy if you know how to do it! :-)
About making the compressed .mod file, do like this on a gnu/linux tar/gzip:
Assuming the module is placed in the directory /tmp/NEWMODULE
cd /tmp tar -cvzf NEWMODULE.mod ./NEWMODULE
And thats it. Please note the "./" specifying the current directory. This is IMPORTANT, due to the way Thecus uncompressed the module. (Rather strange, but its a fact).
Hope this helps!!
Best, Mshapf
|
|