Re: OT: rsync issues

Stefan 'Kaishakunin' Schumacher <[email protected]>
Newsgroups gmane.os.netbsd.help
Message-ID <[email protected]>
Also sprach DataZap ([email protected])
 
> Thankyou for emailing. I am sorry that it has taken me this long to get
> back to you.

Same for me here ,-)

> I think that this is an interesting idea and will probably provide the
> best solution. I think that I understand how to use find, but wc doesn't
> that give a word count.  Could you give me an example of how to do this?

Well, you can use find to get a list of all files beneath a directory
and pipe it to wc to count the lines. The number of lines represent
the number of files:

$ find /home/ | wc -l
315217
$

means, there are 315217 files under /home.

You could than use du to check the filesize:
$du -sm home/*
1708    home/back
178     home/encrypted
693     home/ftp
...
shows the size of each directory.

$ find home/back | wc -l
10

shows that there are 10 files in home/back.
You could than generate a list of directories, that should be synced.

E.g. sth like that:
$cat rsync-list.txt
home/back
home/encrypted
home/ftp

And use a small loop to sync those dir:

for i in `cat rsync-list.txt`
do
rsync -a $i user@server:/back/
done

so each dir is synced seperately. All you have to do is to find a
list, where the directories are small enough to be synced. But I guess
trial & error should work ;-)


-- 
PGP FPR: CF74 D5F2 4871 3E5C FFFE  0130 11F4 C41E B3FB AE33
http://www.net-tex.de                                 
http://www.cryptomancer.de
-- 
Jeder wird als Faust geboren, um alles zu erfassen, alles zu erproben, alles 
auszudrücken. Daß Faust Gelehrter wurde, dafür sorgten die Fehler seiner 
Vorgänger und seiner Zeitgenossen. 
Boris Pasternak, Doktor Schiwago
signature.asc (application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iD8DBQFGOLZ0EfTEHrP7rjMRApEnAJ0ZaKPT0BVAOg5D+Pp5RSese2l4/wCeMN6W
yjTK0WbxL1+ERHegk6rMX3A=
=ysk1
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.