Subject: Re: OT: rsync issues
To: DataZap <az@datazap.net>
From: Stefan 'Kaishakunin' Schumacher <stefan@net-tex.de>
List: netbsd-help
Date: 05/02/2007 18:04:04
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Also sprach DataZap (az@datazap.net)
=20
> 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
=2E..
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 ;-)
--=20
PGP FPR: CF74 D5F2 4871 3E5C FFFE 0130 11F4 C41E B3FB AE33
http://www.net-tex.de =20
http://www.cryptomancer.de
--=20
Jeder wird als Faust geboren, um alles zu erfassen, alles zu erproben, alle=
s=20
auszudr=FCcken. Da=DF Faust Gelehrter wurde, daf=FCr sorgten die Fehler sei=
ner=20
Vorg=E4nger und seiner Zeitgenossen.=20
Boris Pasternak, Doktor Schiwago
--17pEHd4RhPHOinZp
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)
iD8DBQFGOLZ0EfTEHrP7rjMRApEnAJ0ZaKPT0BVAOg5D+Pp5RSese2l4/wCeMN6W
yjTK0WbxL1+ERHegk6rMX3A=
=ysk1
-----END PGP SIGNATURE-----
--17pEHd4RhPHOinZp--