Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] du question



dan ritter writes:
> > On Thu, Jun 08, 2017 at 11:48:52AM -0400, dan moylan wrote:

> > > looking at the sizes of the directories created by
> > > backintime i am puzzled by a directory which shows up as
> > > 86M in one instance and 35G in another.  can someone
> > > please explain what's going on.

> > > moylan 1[1630] ls
> > > 20170607-120002-419/  20170607-230005-357/  b1*  last_snapshot@
> > > moylan 1[1631] du -s *
> > > 35G	20170607-120002-419
> > > 86M	20170607-230005-357
> > > 4.0K	b1
> > > 0	last_snapshot
> > > moylan 1[1632] du -s 20170607-230005-357/
> > > 35G	20170607-230005-357/
> > > moylan 1[1633] du -s ../
> > > 35G	../

> > I don't know backintime, but I'm guessing it uses links to
> > do file-level snapshots. Bet there's a FAQ.

> yes, true enough, and i understand that.  it's the performance
> of du that i don't understand -- look at the two cases:

> this shows the actual storage, 86M assigned to
> 20170607-230005-357.

> > moylan 1[1631] du -s *
> > 35G	20170607-120002-419
> > 86M	20170607-230005-357
> > 4.0K	b1
> > 0	last_snapshot

> this shows the primary backup storage also assigned to
> 20170607-230005-357.

> > moylan 1[1632] du -s 20170607-230005-357/
> > 35G	20170607-230005-357/

> > now why is that?

> Because hardlinks. Explained in a FAQ. I googled "backintime
> faq" and got a faq which said to try this:

> du -hd1 /media/<USER>/backintime/<HOST>/<USER>/1/

i have known from the beginning that the problem had
something to do with hard links.  i tried your suggested
command but it showed the same.

moylan 1[1658] ls
20170607-120002-419/  20170607-230005-357/  20170608-120007-246/  b1*
last_snapshot@
moylan 1[1659] du -s *
35G	20170607-120002-419
86M	20170607-230005-357
80M	20170608-120007-246
4.0K	b1
0	last_snapshot
moylan 1[1660] du -hd1 20170607-230005-357/
35G	20170607-230005-357/backup
35G	20170607-230005-357/
moylan 1[1661] du -s  20170607-230005-357/
35G	20170607-230005-357/

let it be acknowledged that i am naieve, but i expect either
of the last two commands to show 86M, and neither does,
whilst du -s * does.  still puzzled.

ole dan

j. daniel moylan
84 harvard ave
brookline, ma 02446-6202
617-777-0207 (cel)
jdm at moylan.us
www.moylan.us
[no html pls]



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org