On Thu, 2010-12-23 at 09:08 +0100, jurgen.depicker AT let DOT be wrote:
> To see BackupPC progress, I thought a little more about Tyler's
> suggestion, and came up with this:
> watch "lsof -n -ubackuppc | grep -v \" mem \""
>
> Whether rsync or smbclient are used, files being opened by the user
> backuppc show up in this list.
>
> Probably someone can come up with a refinement of this but the man
> page for lsof is a little long :-) .
Well, now this is getting fun.
The lsof manpage is indeed terrible, a wasteland of badly-organised
information and errata. A pox on its author and his pets. Most damning,
lsof cannot filter by file type AND user. So we use grep:
lsof -n -u backuppc | egrep ' (REG|DIR) ' |
egrep -v ' (mem|txt|cwd|rtd) ' | awk '{print $9}'
In my tests, this lists open files used by the BackupPC processes. When
idle, this shows only logs:
/var/local/backuppc/log/LOG
/var/local/backuppc/log/LOG
/var/local/backuppc/log/LOG
When a restore is running, it also lists what files are currently being
read:
/var/local/backuppc/pc/host.example.com/431/f%
2f/fhome/fusername//ftemp_867333d87c32735ce70762d2dc7fca2a
You could filter out the logs too:
lsof -n -u backuppc | egrep ' (REG|DIR) ' |
egrep -v '( (mem|txt|cwd|rtd) |/LOG)' | awk '{print $9}'
You could do a similiar thing on the client:
lsof -n -c rsync | egrep ' (REG|DIR) ' |
egrep -v '( (mem|txt|cwd|rtd) |/LOG)' | awk '{print $9}'
Regards,
Tyler
--
"Privacy has to be viewed in the context of relative power. For example,
the government has a lot more power than the people. So privacy for
the government increases their power and increases the power imbalance
between government and the people; it decreases liberty. Forced openness
in government – open government laws, Freedom of Information Act
filings, the recording of police officers and other government officials,
WikiLeaks – reduces the power imbalance between government and the
people, and increases liberty."
-- Bruce Schneier
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|