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

#1 2007-02-27 23:46:50

Gonzo.T.Durden
Member
Registered: 2007-02-22
Posts: 11

Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

Hi together,

i wanted to use 'rsync' and 'cp' to implement periodic incremental backups as described here:
http://www.mikerubel.org/computers/rsyn … ncremental

(4 backup versions would look like this:
"rm -rf backup.3
mv backup.2 backup.3
mv backup.1 backup.2
cp -al backup.0 backup.1
rsync -a --delete source_directory/  backup.0/")

and to add a cron job as posted here:
http://dns323.kood.org/forum/p1642-2007 … html#p1642

But busybox's 'cp' command lacks the '-l' parameter (to create space saving hard link copies)...
So using rsync is possible but space saving incremental copies aren't possible.

My question is:
Can someone compile a version of 'cp' (GNU / Debian / ...) for our DNS 323 which supports the parameter '-l' or
does someone have a workaround?

Thanks in advance
Gonzo

Offline

 

#2 2007-02-28 00:15:16

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

Re: Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

cp from busybox 1.4.2 seems to support -l. there is a compiled version in
http://www.inreto.de/dns323/bootstrap.tar (actually a symlink to the busybox binary)

another idea: mv backup.0 backup.1 ; rsync --link-dest=backup.1 .... backup.0/
no idea if that does what you want (didnt try it), but the man page says about --link-dest:

            --link-dest=DIR         hardlink to files in DIR when unchanged

Offline

 

#3 2007-02-28 01:39:53

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

What you want is this:

http://www.rsnapshot.org/

Works nice on the nslu2 !

Offline

 

#4 2007-02-28 14:39:17

Gonzo.T.Durden
Member
Registered: 2007-02-22
Posts: 11

Re: Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

fonz wrote:

cp from busybox 1.4.2 seems to support -l. there is a compiled version in
http://www.inreto.de/dns323/bootstrap.tar (actually a symlink to the busybox binary)

...

Hi fonz,

thanx for the busybox binary (1.4.1, but cp -l exists :-) - that's what I needed for my backup purposes.
I tried to use this busybox binary as telnet shell but didn't succeed, telnet doesn't work when I exchange the binaries. Any idea why?
(same topic written here: http://dns323.kood.org/forum/p1688-Yest … html#p1688 - 5.)


frodo wrote:

What you want is this:

http://www.rsnapshot.org/

Works nice on the nslu2 !

frodo's rsnapshot is interesting too, but there aren't DNS323 binaries yet, right?

Thanx a lot
Gonzo

Offline

 

#5 2007-02-28 15:09:20

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

Re: Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

Gonzo.T.Durden wrote:

I tried to use this busybox binary as telnet shell but didn't succeed, telnet doesn't work when I exchange the binaries. Any idea why?
(same topic written here: http://dns323.kood.org/forum/p1688-Yest … html#p1688 - 5.)

You need to configure /dev/pts:
            mknod -m 0666 /dev/ptmx c 5 2
            mkdir /dev/pts
            mount -t devpts devpts /dev/pts

I also explictly pass a shell to the telnetd:
            telnetd -l /opt/bin/ash

Not sure, if it also works with the shipped shell /bin/sh.
I've attached my telnetd-start script (looks for telnetd and shell
in /opt/bin).

Offline

 

#6 2007-02-28 19:03:05

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: Incremental backups using 'rsync', missing 'cp' parameter (cp -l)

rsnapshot is perl. So it needs perl.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB