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

#126 2008-05-28 15:57:21

hastings69
Member
Registered: 2008-01-04
Posts: 56

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

Hi guys.
Although this runs as a dry run, and also runs without error MANUALLY

32 2 * * * /usr/sbin/rtc -s
30 2 2 * * /usr/sbin/rtc -c
59 1 * * * /usr/sbin/daylight &
5 2 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete /mnt/HD_a2 /mnt/HD_b2 >> /mnt/HD_a2/ffp/log/rsync.last.log 2>&1
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

It will not run automatically for me now. I can't seem to find out how. Any thoughts as what I have done wrong. I have posted the crontab -l above, and it now refers to the funplug and also ffp directories after I was trying to "redo" the settings when trying to fix this prob. When I vi the file (FFP) as described however only the FFP line is actually there, no sign of the fun_plug.d one.  Actually it may be I have created a fun_plug.d version hence editcron.sh file? Should I delete it? Is it interfering?

I have also made sure I have followed the a+x command correctly.

So Basically it works manually but not scheduled and running properly.

As this works so well I really would like it just to copy across automatically, and previously I have had it work properly.

I have added append rather than replace log file option. (but can't find the log file as described).

Any help appreciated,
Regards
H69

Last edited by hastings69 (2008-05-28 15:59:19)

Offline

 

#127 2008-05-28 21:31:05

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

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

hastings:
It sounds like you might have multiple executables in the start folder adding crontab tasks.  Also, what version of fonz' fun_plug do you have installed?  Are you aware that there are two different folder structures depending on the version?

Here are a couple commands that could help us get to the bottom of this:

Code:

ls -l /mnt/HD_a2/fun_plug.d/start
ls -l /mnt/HD_a2/fun_plug.d/log

ls -l /mnt/HD_a2/ffp/start
ls -l /mnt/HD_a2/ffp/log

Offline

 

#128 2008-05-29 00:34:33

hastings69
Member
Registered: 2008-01-04
Posts: 56

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

Hi Halfsoul,

I run FFP 0.5, so the fun plug directory was just a cut and paste error (when I cut vi in front it just ran automatically, then not knowing much I must have saved the fun plug directory before I realised I was in the wrong directory!........noob. I am still trying to work vi out with right clicking etc, I'll get better.

I ssh into the DNS. and login as root when I have run these commands initially and also what I paste below.

ffp start
-rw-r--r--    1 root     root           52 Apr 19 22:26 LOGIN.sh
-rw-r--r--    1 root     root           36 Apr 19 22:26 SERVERS.sh
-rw-r--r--    1 root     root          698 Apr 19 22:26 adjtimex.sh
-rwxr-xr-x    1 root     root          539 May 28 23:19 editcron.sh
-rw-r--r--    1 root     root          203 Apr 19 21:11 inetd.sh
-rw-r--r--    1 root     root          229 Apr 15 23:06 kickwebs.sh
-rw-r--r--    1 root     root          223 Apr 15 23:06 lighttpd.sh
-rwxr-xr-x    1 root     root          274 May 28 23:28 mediatomb.sh
-rw-r--r--    1 root     root         1468 Apr 16 06:50 nfsd.sh
-rw-r--r--    1 root     root          526 Apr 16 02:00 ntpd.sh
-rwxr-xr-x    1 root     root          552 Apr 19 22:26 passwd.sh
-rw-r--r--    1 root     root          160 Apr 16 07:18 portmap.sh
-rwxr-xr-x    1 root     root          861 Apr 19 22:26 rcS.sh
-rw-r--r--    1 root     root          224 Apr 16 16:37 rsyncd.sh
-rwxr-xr-x    1 root     root          534 Apr 19 22:26 shells.sh
-rwxr-xr-x    1 root     root          971 Apr 15 06:19 sshd.sh
-rw-r--r--    1 root     root          398 Apr 19 21:11 syslogd.sh
-rw-r--r--    1 root     root          169 Apr 19 22:26 telnetd.sh
-rw-r--r--    1 root     root          998 Apr 17 06:33 unfsd.sh
-rw-r--r--    1 root     root         2064 Apr 19 22:26 usbdisk.sh
funplug log
ls: /mnt/HD_a2/ffp/log: No such file or directory

fun_plug.d start
ls: /mnt/HD_a2/fun_plug.d/start: No such file or directory


fun_plug log
ls: /mnt/HD_a2/fun_plug.d/log: No such file or directory

Thanks for your help.
H69

Last edited by hastings69 (2008-05-29 00:37:07)

Offline

 

#129 2008-05-29 01:05:23

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

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

OK, let's take a look at the contents of your fun plug dir.  Type this:

Code:

/ # ls -l /mnt/HD_a2/ffp

One of your entries should look similar to this:

Code:

drwxr-xr-x    2 root     root         4096 May 16 19:51 log

If not, create a log folder:

Code:

/ # mkdir /mnt/HD_a2/ffp/log

.... and then restart your DNS through the web interface and check the crontab -l results again.

Offline

 

#130 2008-05-29 12:13:40

hastings69
Member
Registered: 2008-01-04
Posts: 56

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

Hi, sorry it took so long, just finished work and straight back to it....

login as: root
root@192.168.1.105's password:
root@Dazza:~# / # ls -l /mnt/HD_a2/ffp
-sh: /: Permission denied
root@Dazza:~# -sh: /: Permission denied
-sh: -sh:: not found
root@Dazza:~# / # mkdir /mnt/HD_a2/ffp/log
-sh: /: Permission denied
(Dazza is the name of my DNS.....just ignore that.....)

Thanks for your help

Offline

 

#131 2008-05-29 20:36:54

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

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

hastings69 wrote:

root@Dazza:~# / # ls -l /mnt/HD_a2/ffp
-sh: /: Permission denied
root@Dazza:~# -sh: /: Permission denied
-sh: -sh:: not found
root@Dazza:~# / # mkdir /mnt/HD_a2/ffp/log
-sh: /: Permission denied

Well, that doesn't make much sense to me.  Have you changed the ffp dir permissions?

Code:

ls -al /mnt/HD_a2/ffp

or

Code:

ls -l /mnt/HD_a2

Offline

 

#132 2008-05-30 01:21:19

hastings69
Member
Registered: 2008-01-04
Posts: 56

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

Not intentionally. I really think not, but I can't be 100%

So in my infinite noob wisdom I chmod 700 -R ffp......with an output of
drwx------    2 root     root         8192 May 24 03:34 bin
drwx------    5 root     root         4096 May 28 15:26 etc
drwx------    4 root     root         4096 May 24 03:34 lib
drwx------    2 root     root         4096 May 24 03:34 libexec
drwx------    2 root     root         4096 May 24 03:34 sbin
drwx------   13 root     root         4096 May 24 03:34 share
drwx------    2 root     root         4096 May 24 03:47 start
drwx------    2 root     root         4096 Apr 19 14:39 tmp
drwx------    5 root     root         4096 May 28 15:05 var

I now can't ssh into the box (familiar problem with me and permissions with this) but am telnetting in, after I stuffed with the ssh permissions AGAIN (I am really dangerous with that!) I am learning by trial and error, error error...... all my uninformed efforts.

I can easily start from scratch again with FFP, and keep my data/media files, is this the best rather than consume vast amounts fo everyones time for individual file permissions? However this is the exact reason why I had to reinstall fpp from changing permissions last time and ssh not being happy with it. And I expect to be facing the same problem that it won't rerun. Are there hidden files that I didn't delete last time reinstalling FFP within FFP that may be affecting it all?

Cheers
H69

Offline

 

#133 2008-05-30 02:05:24

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

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

hastings69 wrote:

infinite noob wisdom

lol

It might be best to reinstall ffp from scratch.  Looking through my ffp dir, there is quite a variation in permissions so it wouldn't be "easy" to restore the original permissions.  Of course, it wouldn't be difficult, it would just take quite a bit of time.

I think your SSH no longer functions because of the permissions/executable situation, and it sounds like the VolA to VolB backup isn't working because you don't have a log dir.  Not sure why that would prevent it from running, but I though someone earlier in the thread mentioned having a similar problem.  Plus, the logging is the only difference between your commands that do work (dry run & on-demand) and the one that doesn't (scheduled).

However, I also wonder if having the two simultaneous entries in your cron has something to do with it.  If you do re-install ffp, I would be interested to know you end up with as far as scheduled tasks.

Good luck!

Offline

 

#134 2008-06-01 00:12:30

marinalink
Member
Registered: 2008-04-13
Posts: 56

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

For those who don't know rsnapshot, have a look here Rsnapshot for local and remote backup,

It does also (incremental) backups and rsnapshot is now quite stable and very well tested.

Just a hint,
marinalink

Offline

 

#135 2008-06-12 20:43:35

Solo100
New member
Registered: 2008-06-09
Posts: 4

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

Hi all, newbie here, so please, be gentle... wink  In February I have installed fun_plug .3 and followed the disk copying procedure described here. Recently I had rights problems with the copied files and seize the occasion to install the new firmware 1.05 and new fun_plug ffp .5.

So after a couple of problems, the ffp is now installed and I can telnet into the unit. But weirdly, when I connect I don't have the Busy Box introduction. Only:

/ #

So I typed the first line and here's what I get after doing ENTER:


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

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
I /mnt/HD_a2/ffp/start/editcron.sh [Modified] 1/1 100%

after that if I type "a" (or anything else) I still get "locked" in this box, no flashing # sign, no nothing... and if I go back to check on my volume_1/start , the file is not created. Is there another thing I have to do to activate vi  with ffp .5 ? Or how can I get out of this to enter the "copying script" ?

Any help will be a0preciated, thanks in advance

Solo

Offline

 

#136 2008-06-13 02:14:23

drak0
Member
Registered: 2007-05-20
Posts: 20

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

Solo,

You need to read a tutorial on how to use vi.

http://www.viemu.com/a_vi_vim_graphical … orial.html

Offline

 

#137 2008-06-13 02:52:57

hastings69
Member
Registered: 2008-01-04
Posts: 56

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

Also I don't get a busybox intro with ffp 0.5, so I just continue. I think that is a change from ffp 0.3 and ffp 0.4, I think it is fine and normal. Don't worry about it.

Make sure you follow the instructions EXACTLY letter for letter, it worked for me if I did it EXACTLY. I am a newb and have got it to work, I didn't need to know VI except for following these instructions exactly, if redoing it doesn't work please repost, someone here can help.

Offline

 

#138 2008-06-18 05:26:17

Solo100
New member
Registered: 2008-06-09
Posts: 4

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

Thanks guys, after reading yours posts and even trying to figure out a bit about "vi", I definitely made some progress... smile

In fact, it seems the first part is ok as I created the editcron.sh file and what is listed seems the same as what it should. My problem now is that I seem unable to make this file executable.

I entered the script correctly at the # prompt and when I do the crontab -l command, I don't see the new script listed, only the 3 original ones, and obviously the backup doesn't execute... and I did reboot after doing the command.

Should I have do some vi command before entering the "chmod a+x /mnt/HD_a2/ffp/start/editcron.sh" code after the putty # sign, or after?? Or is there anything I missed that you can see?

Thanks again for any help...

Solo

Offline

 

#139 2008-06-20 20:45:07

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

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

Solo100 wrote:

Or is there anything I missed that you can see?

Solo, type the following into PuTTY:

Code:

ls -l /mnt/HD_a2/ffp/start/

You're looking for "-rwxr-xr-x" at the beginning of the editcron.sh line.  If it's not there, then execute "chmod a+x /mnt/HD_a2/ffp/start/editcron.sh" at the putty # sign.  To check to make sure you did it right, you can type the code above again and verify you get "-rwxr-xr-x" now.

FYI: any item that shows "-rw-r--r--" will not be executed at boot-time.

Another thing you can do is look in your fun_plug.log file, to see if there were errors when trying to execute the editcron.sh file

Offline

 

#140 2008-06-25 01:15:06

robertvk
New member
Registered: 2008-06-25
Posts: 1

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

I'm getting a 'permission denied" log, sorry to be such a noob, I'm not sure which permissions to look at...? Thanks so much for any help!

The log is: /mnt/HD_a2/ffp/bin: Permission denied.

But I can just run

/mnt/HD_a2/ffp/bin/rsync -av --delete /mnt/HD_a2 /mnt/HD_b2

as per shadow349's 12.5.08 post.... copying away happily now.

Last edited by robertvk (2008-06-29 12:05:28)


DNS-323     F/W: 1.05  H/W: A1  ffp: 0.5  Drives: 2X 750GB Seagate SATA-300

Offline

 

#141 2008-06-27 12:40:53

knireis
Member
Registered: 2007-12-10
Posts: 231

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

I have the same problem as previous poster. I'm using ffp 0.5 on a usb stick.
crontab -l gives the correct reply, but nothing happens at the specified backup time. (i did create a log directory in /ffp)
the manual command does the job without problems.

Offline

 

#142 2008-06-28 01:38:23

SpectralDesign
Member
Registered: 2008-06-25
Posts: 6

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

knireis,

that the line is in crontab is a good sign, but my first guess is that perhaps you haven't rebooted?  If you reboot, and without doing anything other than logging in and a `crontab -l` you see the line in there, then everything *ought* to work as expected.  (I think the reboot is required because the DNS-323 doesn't re-read crontab after booting (in other words, changed made after booting are ignored by the O.S.)

At least, that's my best guess at the moment....

Offline

 

#143 2008-06-28 09:08:24

knireis
Member
Registered: 2007-12-10
Posts: 231

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

SpectralDesign wrote:

knireis,

that the line is in crontab is a good sign, but my first guess is that perhaps you haven't rebooted?  If you reboot, and without doing anything other than logging in and a `crontab -l` you see the line in there, then everything *ought* to work as expected.  (I think the reboot is required because the DNS-323 doesn't re-read crontab after booting (in other words, changed made after booting are ignored by the O.S.)

At least, that's my best guess at the moment....

Thanks for the reply but i did a reboot. I used to make a backup with funplug 0.4 and that worked fine, but since 0.5 i can't get it to work automatically.

Offline

 

#144 2008-06-28 10:09:37

knireis
Member
Registered: 2007-12-10
Posts: 231

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

As extra information: in the ffp.log file the following lines about the editcron:

* /ffp/start/editcron.sh ...
BusyBox v1.00-pre1 (2007.12.10-08:03+0000) multi-call binary

Usage: crontab crontab [-c dir] {file|-}|[-u|-l|-e|-d user]

Is this the normal situation?

Offline

 

#145 2008-06-29 11:35:18

knireis
Member
Registered: 2007-12-10
Posts: 231

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

I don't know why (probably some finger trouble earlier), but it started working last night.

Offline

 

#146 2008-07-01 20:02:57

TomSluyts
Member
Registered: 2008-06-26
Posts: 14

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

For a "normal" incremental backup, is this rsync command correct ?

/mnt/HD_a2/ffp/bin/rsync -a --update --delete /mnt/HD_a2 /mnt/HD_b2

This should : delete all files in destination that are not in source, overwrite any old files on destination and leave the == files alone, right?

Offline

 

#147 2008-07-08 17:08:36

greg
Member
Registered: 2008-07-04
Posts: 6

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

I apologize if these are stupid questions.  I've been running this backup procedure for several months now with just 2 disks, backing up Volume_1 to Volume_2.  2 questions:

1.  I assume the rsync is unidirectional, correct?  So that if Volume_2 fails, it won't erase everything on Volume_1, right?

2.  If Volume_1 fails, would I just move Volume_2 to the Right drive and restart?

Offline

 

#148 2008-07-13 15:16:51

Chumby
Member
From: Tasmania, Australia
Registered: 2007-08-01
Posts: 96
Website

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

Howdy Greg, 

Just moving Vol_2 over to Vol_1 wont work, because the backup drive (Vol_2) stores data in a unique folder.

Have you thought about introducing a third drive?

Cheers
Chumby

Offline

 

#149 2008-07-13 21:53:43

potad
Member
Registered: 2008-07-12
Posts: 8

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

shadow349 wrote:

I am using RAID-1 and rsync to an external USB drive three times a day.

Is there a walkthrough of how to use rsync with the 323 and an external drive?  I thought the USB port was for printers only?  Sorry, i'm a total newbie to this...

Offline

 

#150 2008-07-14 16:12:48

greg
Member
Registered: 2008-07-04
Posts: 6

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

Chumby wrote:

Howdy Greg, 

Just moving Vol_2 over to Vol_1 wont work, because the backup drive (Vol_2) stores data in a unique folder.

Have you thought about introducing a third drive?

Cheers
Chumby

I'm open to adding a 3rd drive, but the question would still be the same:  what happens if the Vol_1 drive fails?  I would then have 2 backups.  I'm just trying to work through the sequence of what to do in the event of failure (rather than trying to figure it out in the heat of the moment).

If I can't simply move the LHS drive to the RHS bay, then I would need to have a blank drive on hand to put into the LHS in the event of failure.  Format that, and then copy back from Vol_2 to the new Vol_1?

G

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB