DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#226 2009-03-06 20:08:28

halfsoul
Member
Registered: 2008-01-28
Posts: 57

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

@partimers: I think the dns could handle your backup method, but it seems to me that there is no way to automate it.  Instead of setting up a scheduled event as this thread describes, you would be manually issuing the rsync command after swapping out drives.

As for JBOD, I don't have any experience with it.  But if the implementation behaves anything like RAID, then you will likely run into issues with the concatenation breaking once you remove a drive.

Maybe you should consider either the DNS-343 or external drives.

Offline

 

#227 2009-03-09 21:29:08

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Hi,

I am having an issue with the first portion of the instructions.  I was planning a "test" at 3:30PM today but I seem to be stuck.  Is the "$" different from the "#"? 

My Volume_1 is my "backup drive" my Volume_2 is my data drive. 

Any idea what I am doing wrong?  I have ffp.05.

Thanks,
Rich

login as: richtj99
richtj99@192.168.1.170's password:


BusyBox v1.00-pre1 (2008.09.02-11:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

5784468
$ ls
Volume_1  Volume_2
$ vi /mnt/HD_a2/fun_plug.d/start/editcron.sh
#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt

# start with existing crontab
/bin/crontab -l > $CRONTXT

# add the Rsync job to execute at 2:05 am - also create a logfile (append to any
# note: use a single > after /mnt/HD_b2 if you want to a create a new log file e
/bin/echo "30 15 * * * /mnt/HD_a2/fun_plug.d/bin/rsync -av --delete /mnt/HD_a2 /

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT
~
~
~
~
~
~
~
$ chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh
chmod: /mnt/HD_a2/fun_plug.d/start/editcron.sh: No such file or directory
$ ls
Volume_1  Volume_2
$ cd Volume_1
$ ls
$ cd
$ ls
Volume_1  Volume_2
$ cd Volume_2
$ ls
Ext2IFS_1_11a.exe             ffp
Files                         ffp.log
Hard Drive Images             fun_plug
Network Drive - 1-20-2009     ubuntu-8.10-desktop-i386.iso
Raid Drive
$ chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh
chmod: /mnt/HD_a2/fun_plug.d/start/editcron.sh: No such file or directory
$

Offline

 

#228 2009-03-09 21:32:15

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Actually if i do this: 

$ vi /mnt/HD_a2/fun_plug.d/start/editcron.sh

There is no data saved in that file.

To get out of Vi, I am doing an escape, then ":wq" but I dont think anything is getting saved.

Offline

 

#229 2009-03-09 22:33:18

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

# is the root prompt, $ is the prompt of non-root users. to edit files in fun_plug.d, you must be root.
http://polishlinux.org/console/file-per … -in-linux/

Offline

 

#230 2009-03-11 17:07:51

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

So I login as root:

root@DNS:~# vi /mnt/HD_a2/fun_plug.d/start/editcron.sh
#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt

# start with existing crontab
/bin/crontab -l > $CRONTXT

# add the Rsync job to execute at 2:05 am - also create a logfile (append to any existing log file)
# note: use a single > after /mnt/HD_b2 if you want to a create a new log file each night with no append
/bin/echo "04 11 * * * /mnt/HD_a2/fun_plug.d/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/fun_plug.d/log/rsync.last.log 2>&1" >> $CRONTXT

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/mnt/HD_a2/fun_plug.d/start/editcron.sh" No such file or directory


I thought that when you Vi that file, it makes it as well.  Is the step that I need to make editcron.sh first, then VI into it?  I thought Vi'ing would do it once saved.  Though I cant seem to save it using the :wq command.

Any ideas what I am doing wrong?

Thanks,
Rich

Offline

 

#231 2009-03-11 22:41:37

JP
New member
Registered: 2009-03-10
Posts: 3

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

you have to save the file using the :wq approche. make the file just as in your post and to save it, hit " esc " then " :wq " "enter" and the file should be created.  also, what version of fun plug are you using?

Offline

 

#232 2009-03-12 05:08:43

roth140
Member
Registered: 2009-03-12
Posts: 43

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

ive been messing with fun_plug for a little while now but im still new to the code stuff.

i have telnet working as well as fan_control, but i cant get the data backup to work... it seems.

one part of the first post confuses me:

5 2 * * * /mnt/HD_a2/fun_plug.d/bin/rsync -rlptDv --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/fun_plug.d/log/rsync.last.log 2>&1

i dont have the bold part when i type crontab -l

ill post my /ffp/start editcron.sh

#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt
/bin/crontab -l > $CRONTXT

# add the Rsync job to excute at 10:00 pm - also create  a logfile (append to any existing log file)
# note: use a single > after /mnt/HD_b2 if you want to create a new log file each night with no append
/bin/echo "0 22 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete  /mnt/HD_a2 mnt/HD_b2 >>
/mnt/HD_a2/ffp/log/rsync.last.log 2>&1" >> $CRONTXT

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT

i wanted it to run at 10:00pm, so i changed the time to "0 22 * * *

i hope thats right.

i typed in chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh

and i created /ffp/log

any ideas?

Offline

 

#233 2009-03-12 06:09:19

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

JP wrote:

you have to save the file using the :wq approche. make the file just as in your post and to save it, hit " esc " then " :wq " "enter" and the file should be created.  also, what version of fun plug are you using?

That is what I am doing & I keep getting the "/mnt/HD_a2/fun_plug.d/start/editcron.sh" No such file or directory" error message. 

I am using FFP .05 - the latest one. 


Could the issue be that on my drive itself the directory is:  X:\ffp\start 

It is not fun_plug.d as the directory but ffp? 

Thanks,
Rich

Offline

 

#234 2009-03-12 09:32:07

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

roth140 wrote:

ive been messing with fun_plug for a little while now but im still new to the code stuff.

i have telnet working as well as fan_control, but i cant get the data backup to work... it seems.

one part of the first post confuses me:

5 2 * * * /mnt/HD_a2/fun_plug.d/bin/rsync -rlptDv --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/fun_plug.d/log/rsync.last.log 2>&1

i dont have the bold part when i type crontab -l

ill post my /ffp/start editcron.sh

#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt
/bin/crontab -l > $CRONTXT

# add the Rsync job to excute at 10:00 pm - also create  a logfile (append to any existing log file)
# note: use a single > after /mnt/HD_b2 if you want to create a new log file each night with no append
/bin/echo "0 22 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete  /mnt/HD_a2 mnt/HD_b2 >>
/mnt/HD_a2/ffp/log/rsync.last.log 2>&1" >> $CRONTXT

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT

i wanted it to run at 10:00pm, so i changed the time to "0 22 * * *

i hope thats right.

i typed in chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh

and i created /ffp/log

any ideas?

yes, I've got a few:

First -rlptDv is the same as the "a" of the "-av" part if you do the crontab -l part. It's some sort of shortening the command.

Add a "/" and it will work!
/bin/echo "0 22 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete  /mnt/HD_a2 /mnt/HD_b2 >>
/mnt/HD_a2/ffp/log/rsync.last.log 2>&1" >> $CRONTXT


Watch out when you use ffp or fun_plug.d! Are you using funplug 0.5? If so please use this command to execute the editcron.sh:
chmod a+x /mnt/HD_a2/ffp/start/editcron.sh

Last edited by bvsteyn (2009-03-12 09:43:48)

Offline

 

#235 2009-03-12 09:39:24

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

RichTJ99 wrote:

JP wrote:

you have to save the file using the :wq approche. make the file just as in your post and to save it, hit " esc " then " :wq " "enter" and the file should be created.  also, what version of fun plug are you using?

That is what I am doing & I keep getting the "/mnt/HD_a2/fun_plug.d/start/editcron.sh" No such file or directory" error message. 

I am using FFP .05 - the latest one. 


Could the issue be that on my drive itself the directory is:  X:\ffp\start 

It is not fun_plug.d as the directory but ffp? 

Thanks,
Rich

You should use the command: vi /mnt/HD_a2/ffp/start/editcron.sh
than edit the code by hitting "a" and use "escape" and :wq to save the file

Offline

 

#236 2009-03-12 15:44:39

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Thanks, I just changed everything: 

vi /mnt/HD_a2/ffp/start/editcron.sh


#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt

# start with existing crontab
/bin/crontab -l > $CRONTXT

# add the Rsync job to execute at 2:05 am - also create a logfile (append to any existing log file)
# note: use a single > after /mnt/HD_b2 if you want to a create a new log file each night with no append
/bin/echo "45 9 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/ffp/log/rsync.last.log 2>&1" >> $CRONTXT

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT


chmod a+x /mnt/HD_a2/ffp/start/editcron.sh

It all looked like it worked! 

I guess I will find out soon.

Offline

 

#237 2009-03-12 16:09:17

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Hrmm, 9:45 came & went but nothing happened & there is no file in my log.  I did the date command & it seems ot be the correct date & time. 
When I check the crontab -l

32 2 * * * /usr/sbin/rtc -s
30 2 2 * * /usr/sbin/rtc -c
59 1 * * * /usr/sbin/daylight &
45 9 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/ffp/log/rsync.last.log 2>&1


Any ideas what I did wrong?

Offline

 

#238 2009-03-12 16:32:03

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

RichTJ99 wrote:

Hrmm, 9:45 came & went but nothing happened & there is no file in my log.  I did the date command & it seems ot be the correct date & time. 
When I check the crontab -l

32 2 * * * /usr/sbin/rtc -s
30 2 2 * * /usr/sbin/rtc -c
59 1 * * * /usr/sbin/daylight &
45 9 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/ffp/log/rsync.last.log 2>&1


Any ideas what I did wrong?

Did you use the 24 hour time notation? Ddi you mean 21:45 pm? (don't know where you're from). Please check if you time setting is ok through the webinterface. First time I used this I found out that the time setting were wrong..

Also did you use mkdir to create the "log" dir manually?

Last edited by bvsteyn (2009-03-12 16:41:36)

Offline

 

#239 2009-03-12 16:47:44

RichTJ99
Member
Registered: 2009-01-09
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Hi,

I used:

/bin/echo "15 10 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_

Which I think should be 10:15 (I keep changing it to see if it works).

root@DNS:~# date
Thu Mar 12 10:39:40 DST 2009
root@DNS:~#

I did manually create the log dir (mkdir)

I can see it here:  X:\ffp\log  Unfortunately its empty. 

I also rebooted the DNS to make sure that it was all running properly.

Is it possible my DNS is not running in 24 hours?  I am from New York & its 10:40 am here now. 

I didnt get any errors during setup. 

Thanks,
Rich

Offline

 

#240 2009-03-13 04:59:49

roth140
Member
Registered: 2009-03-12
Posts: 43

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

still no auto transfer

i think it has something to do with the time to execute it.  besides vi on editcron.sh is there anywhere else the info needs to be.  i see fun_plug, crontab, and ffp in my root.  should there be any reference to the events im trying to launch added to those files?

http://home.comcast.net/~roth.scott/telnet/editcron.JPG

http://home.comcast.net/~roth.scott/telnet/crontab.JPG

i know the command line works, heres the dry run with some Docs i tossed in, new since i manually ran the job.


http://home.comcast.net/~roth.scott/telnet/mnt.JPG

something has to be broke with the * * * * * or rsync... i dont know enough yet.

Last edited by roth140 (2009-03-13 06:41:44)

Offline

 

#241 2009-03-13 09:26:19

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

RichTJ99 wrote:

Hi,

I used:

/bin/echo "15 10 * * * /mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_

Which I think should be 10:15 (I keep changing it to see if it works).

root@DNS:~# date
Thu Mar 12 10:39:40 DST 2009
root@DNS:~#

I did manually create the log dir (mkdir)

I can see it here:  X:\ffp\log  Unfortunately its empty. 

I also rebooted the DNS to make sure that it was all running properly.

Is it possible my DNS is not running in 24 hours?  I am from New York & its 10:40 am here now. 

I didnt get any errors during setup. 

Thanks,
Rich

Did you already try to use the rsync command manually? So try to use this command at the command prompt:
rsync -av --delete /mnt/HD_a2 /mnt/HD_b2

It should rsync the directory from HD_a2 to HD-b2. If this is working we can concentrate on the scheduling part.

Offline

 

#242 2009-03-13 10:05:21

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

roth140 wrote:

still no auto transfer

i think it has something to do with the time to execute it.  besides vi on editcron.sh is there anywhere else the info needs to be.  i see fun_plug, crontab, and ffp in my root.  should there be any reference to the events im trying to launch added to those files?

http://home.comcast.net/~roth.scott/telnet/editcron.JPG

Please try this: /bin/echo "00 20 * * * /mnt/.....

or try /bin/echo "0 20 * * * /mnt/....

Right now it should work at 20:00 (or fill in another time). I think that the time notation you are using is wrong.

Last edited by bvsteyn (2009-03-13 10:08:23)

Offline

 

#243 2009-03-13 15:39:39

roth140
Member
Registered: 2009-03-12
Posts: 43

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

its 8:30 am here, lets shoot for 11am backup.

http://home.comcast.net/~roth.scott/telnet/crontab11am.JPG

Last edited by roth140 (2009-03-13 15:40:09)

Offline

 

#244 2009-03-13 16:08:16

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

roth140 wrote:

its 8:30 am here, lets shoot for 11am backup.

http://home.comcast.net/~roth.scott/tel … ab11am.JPG

Why wait that long? You can schedule it now to run in 5 minutes..
You don't have to wait that long.

Let me know what happens!

Offline

 

#245 2009-03-13 16:32:02

qryptiq
Member
From: New Ro
Registered: 2009-03-10
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

thank you chumby - et al who contributed to this post. I just finish reading all 10 pages and learned a lot. As a noob this stuff can be daunting. Here are two of my concerns.

1.  It's my understanding that the DNS-321/323 comes with linux.  Can the backup solution run (independent) on the BOX without a computer?

2. Chumby, could you do a simple write up for restoration? That would be ideal for me should the s**T hit the fan and i find myself scrambling to restore my data.


~~~~~~~~~~~~~~~~~~~
DNS-321, 2x1.5tb Barracudas

Offline

 

#246 2009-03-13 16:38:32

roth140
Member
Registered: 2009-03-12
Posts: 43

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

haha, i have to head in to work for a little bit this morning.  its sad to check HD_b2 and see theres no copying hmm  thanks again for checking in on the posts here bvstyen.  i thought i had it fixed with the "/" you found missing.  i know it has to be in the scheduling part.  i uninstalled fun_plug and ffp last night and started clean.  do you know if there are supposed to be any files created outside of start/editcron.sh?  i keep seeing crontab.txt in the code, but i dont see it in any folders.  and do i need to add anything to the actual fun_plug itself?

i know im missing something small here.  thats what makes it frustrating.

qryptiq:  once you setup fun_plug with a computer, a task like this thread will run on its own with no computers on the network running.  its a automated backup from one vol. to the other.

Offline

 

#247 2009-03-13 16:53:58

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

roth140 wrote:

haha, i have to head in to work for a little bit this morning.  its sad to check HD_b2 and see theres no copying hmm  thanks again for checking in on the posts here bvstyen.  i thought i had it fixed with the "/" you found missing.  i know it has to be in the scheduling part.  i uninstalled fun_plug and ffp last night and started clean.  do you know if there are supposed to be any files created outside of start/editcron.sh?  i keep seeing crontab.txt in the code, but i dont see it in any folders.  and do i need to add anything to the actual fun_plug itself?

i know im missing something small here.  thats what makes it frustrating.

qryptiq:  once you setup fun_plug with a computer, a task like this thread will run on its own with no computers on the network running.  its a automated backup from one vol. to the other.

Fortunately I'm already at the end of my working day... ;-)
You only have to create the editcron part in the start folder...chmod it to be executable and you're done..hopefully it is working for you right now..

Offline

 

#248 2009-03-13 18:23:16

roth140
Member
Registered: 2009-03-12
Posts: 43

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

yea, that last time code you helped with ran at 11:00am here.  i had to stare at the screen until it hit me my test files made it into HD_b2.  i checked the log file on HD_a2 and its all accounted for.

thanks for the help!

Offline

 

#249 2009-03-13 19:30:39

bvsteyn
Member
Registered: 2008-02-14
Posts: 14

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

Your welcome..

Glad I could help!
Have fun!

Offline

 

#250 2009-03-13 21:25:08

qryptiq
Member
From: New Ro
Registered: 2009-03-10
Posts: 49

Re: Tutorial: Backup Everything from Vol A to Vol B once a night

thanks roth140


~~~~~~~~~~~~~~~~~~~
DNS-321, 2x1.5tb Barracudas

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB