Re: Lost /var/db/pkg

2012-06-14 Thread William Orr
Thanks, it looks like I had a copy from May in there that was fairly
accurate!
On Jun 13, 2012 5:03 PM, Warren Block wbl...@wonkity.com wrote:

 On Wed, 13 Jun 2012, Eitan Adler wrote:

  On 12 June 2012 18:03, William Orr w...@worrbase.com wrote:

 Hello,

 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?


 look in /var/db/pkgdb.bak.tbz

  ^^^
 ITYM /var/backups/pkgdb.bak.tbz.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Matthew Seaman
On 13/06/2012 02:03, William Orr wrote:
 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?

Reinstall all the ports on your system?  Since you've lost /var/db/pkg,
you won't have a handy record of what the necessary packages are.  You
can get a long way by starting with ports you want directly (eg.
firefox) and reinstalling all of their dependencies.

It's unlikely to be completely accurate, and the system will probably
have odd little issues with normal ports maintenance going on.  Perhaps
the most effective procedure would be to wipe out the contents of
/usr/local and /compat/linux and just start again from scratch.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey





signature.asc
Description: OpenPGP digital signature


Re: Lost /var/db/pkg

2012-06-13 Thread Matthias Apitz
El día Wednesday, June 13, 2012 a las 07:16:44AM +0100, Matthew Seaman escribió:

 On 13/06/2012 02:03, William Orr wrote:
  I had a hard disk failure some time ago, and I ended up losing
  /var/db/pkg/ and everything under it (before you say I should've been
  backing it up, I know, I was actually doing an initial full when this
  happened). Is there a way I can restore it, or at least manually add
  entries I know for sure about?
 
 Reinstall all the ports on your system?  Since you've lost /var/db/pkg,
 you won't have a handy record of what the necessary packages are.  You
 can get a long way by starting with ports you want directly (eg.
 firefox) and reinstalling all of their dependencies.
 
 It's unlikely to be completely accurate, and the system will probably
 have odd little issues with normal ports maintenance going on.  Perhaps
 the most effective procedure would be to wipe out the contents of
 /usr/local and /compat/linux and just start again from scratch.

The later is the only way: wipe out /usr/local and /compat/linux because
many ports during the intent of 'make install' will check for files
there and do nothing for ports they depend on because they 'think' that
the port on which they depend on is installed already. Without this
you will never ever get a correct /var/db/pkg.

matthias
-- 
Matthias Apitz
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Robert Huff

Matthew Seaman writes:

   I had a hard disk failure some time ago, and I ended up losing
   /var/db/pkg/ and everything under it (before you say I should've been
   backing it up, I know, I was actually doing an initial full when this
   happened). Is there a way I can restore it, or at least manually add
   entries I know for sure about?
  
  Reinstall all the ports on your system?  Since you've lost
  /var/db/pkg, you won't have a handy record of what the necessary
  packages are.  You can get a long way by starting with ports you
  want directly (eg.  firefox) and reinstalling all of their
  dependencies.
  
  It's unlikely to be completely accurate, and the system will
  probably have odd little issues with normal ports maintenance
  going on.  Perhaps the most effective procedure would be to wipe
  out the contents of /usr/local and /compat/linux and just start
  again from scratch.

Only that's going to eradicate anything in /usr/local that a)
one wants/uses and b) wasn't put there by ports.  (Tell me you don't
have a handful of scripts which have been working happily away since
you wrote them in the early Devonian.  :-)
A less drastic path would be to wipe out /usr/local/{lib,
libexec}, /compat/linux, and whatever directory has port-installed
docs.  
Check /usr/local/bin, /usr/local/etc (especially rc.d/), and
/usr/local/share; many files there are named for their ports. Grep
bin/ for anything whose first line is #! /bin/sh, and figure out
where it came from.
_Now_ start with major prograns you know were installed  -
on my system that would be emacs, FireFox, Java, LibreOffice,
ImageMagick, and mplayer - and get out your copy of very long
pretentious novel - because even on a fast system you're talking
days to put everything back.


Robert learned the hard way Huff
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread jb
William Orr will at worrbase.com writes:

 
 Hello,
 
 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?

forums.freebsd.org/showthread.php?t=6466
The application themselves are still installed and will keep functioning, you
just removed the records of their installation. When you later install newer
versions, you may have to use a force flag to overwrite files (the port thinks
it is uninstalled after all). The new port installations will get recorded in
/var/db/pkg again.'

jb



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Eitan Adler
On 13 June 2012 12:17, jb jb.1234a...@gmail.com wrote:
 William Orr will at worrbase.com writes:


 Hello,

 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?

 forums.freebsd.org/showthread.php?t=6466
 The application themselves are still installed and will keep functioning, you
 just removed the records of their installation. When you later install newer
 versions, you may have to use a force flag to overwrite files (the port thinks
 it is uninstalled after all). The new port installations will get recorded in
 /var/db/pkg again.'

 jb

This will work if you need minimal downtime, but *will* come back to
bite you some time down the line.


-- 
Eitan Adler
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Waitman Gobble
On Wed, Jun 13, 2012 at 2:26 PM, Eitan Adler li...@eitanadler.com wrote:

 On 13 June 2012 12:17, jb jb.1234a...@gmail.com wrote:
  William Orr will at worrbase.com writes:
 
 
  Hello,
 
  I had a hard disk failure some time ago, and I ended up losing
  /var/db/pkg/ and everything under it (before you say I should've been
  backing it up, I know, I was actually doing an initial full when this
  happened). Is there a way I can restore it, or at least manually add
  entries I know for sure about?
 
  forums.freebsd.org/showthread.php?t=6466
  The application themselves are still installed and will keep
 functioning, you
  just removed the records of their installation. When you later install
 newer
  versions, you may have to use a force flag to overwrite files (the port
 thinks
  it is uninstalled after all). The new port installations will get
 recorded in
  /var/db/pkg again.'
 
  jb

 This will work if you need minimal downtime, but *will* come back to
 bite you some time down the line.


 --
 Eitan Adler
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org


you could cross reference the package .tbz files with what's on your
system.

ie, tar -ztvf apache-2.2.22_5.tbz
shows you what's in /usr/local/bin, etc. Might even be able to focus on man
pages only to get an xref index.

I believe the files for /var/db/pkg are in the tbz files.
if you didn't keep your system up to date it might be trouble matching
versions, but you could get the list and see what's what, or at least have
a good idea of what _was_ installed.
I haven't tried but you could stick the 'current' files for /var/db/pkg
from tbz, matching what's installed - regardless of the 'new' version and
actual version installed, then to a pkg_delete --force then pkg_add .tbz .
it might complain about missing files but will 'prolly function.
If you have like 700-1000+ packages it might be worth the trouble.

A thought :)

Waitman Gobble
San Jose California USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Robison, Dave
On 06/13/2012 16:10, Waitman Gobble wrote:
 On Wed, Jun 13, 2012 at 2:26 PM, Eitan Adler li...@eitanadler.com wrote:

 On 13 June 2012 12:17, jb jb.1234a...@gmail.com wrote:
 William Orr will at worrbase.com writes:

 Hello,

 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?
 forums.freebsd.org/showthread.php?t=6466
 The application themselves are still installed and will keep
 functioning, you
 just removed the records of their installation. When you later install
 newer
 versions, you may have to use a force flag to overwrite files (the port
 thinks
 it is uninstalled after all). The new port installations will get
 recorded in
 /var/db/pkg again.'

 jb
 This will work if you need minimal downtime, but *will* come back to
 bite you some time down the line.


 --
 Eitan Adler
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

 you could cross reference the package .tbz files with what's on your
 system.

 ie, tar -ztvf apache-2.2.22_5.tbz
 shows you what's in /usr/local/bin, etc. Might even be able to focus on man
 pages only to get an xref index.

 I believe the files for /var/db/pkg are in the tbz files.
 if you didn't keep your system up to date it might be trouble matching
 versions, but you could get the list and see what's what, or at least have
 a good idea of what _was_ installed.
 I haven't tried but you could stick the 'current' files for /var/db/pkg
 from tbz, matching what's installed - regardless of the 'new' version and
 actual version installed, then to a pkg_delete --force then pkg_add .tbz .
 it might complain about missing files but will 'prolly function.
 If you have like 700-1000+ packages it might be worth the trouble.

 A thought :)

 Waitman Gobble
 San Jose California USA
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


locate /var/db/pkg

Might show you what was there recently...

ls /usr/ports/distfiles

might also go a long way toward showing you what you once had installed.

apologies if these were previously mentioned.

-- 
Dave Robison
Sales Solution Architect II
FIS Banking Solutions
510/621-2089 (w)
530/518-5194 (c)
510/621-2020 (f)
da...@vicor.com
david.robi...@fisglobal.com

_
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread RW
On Wed, 13 Jun 2012 19:17:20 + (UTC)
jb wrote:

 William Orr will at worrbase.com writes:
 
  
  Hello,
  
  I had a hard disk failure some time ago, and I ended up losing
  /var/db/pkg/ and everything under it (before you say I should've
  been backing it up, I know, I was actually doing an initial full
  when this happened). Is there a way I can restore it, or at least
  manually add entries I know for sure about?
 
 forums.freebsd.org/showthread.php?t=6466
 The application themselves are still installed and will keep
 functioning, you just removed the records of their installation. When
 you later install newer versions, you may have to use a force flag to
 overwrite files (the port thinks it is uninstalled after all). The
 new port installations will get recorded in /var/db/pkg again.'

I wouldn't do that, it's not as simple as that post suggests. It's
likely to lead to a lot of files being orphaned, which may lead to
build or runtime errors in the future, or vulnerabilities  that
portaudit can't detect.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Eitan Adler
On 12 June 2012 18:03, William Orr w...@worrbase.com wrote:
 Hello,

 I had a hard disk failure some time ago, and I ended up losing
 /var/db/pkg/ and everything under it (before you say I should've been
 backing it up, I know, I was actually doing an initial full when this
 happened). Is there a way I can restore it, or at least manually add
 entries I know for sure about?

look in /var/db/pkgdb.bak.tbz

-- 
Eitan Adler
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Lost /var/db/pkg

2012-06-13 Thread Warren Block

On Wed, 13 Jun 2012, Eitan Adler wrote:


On 12 June 2012 18:03, William Orr w...@worrbase.com wrote:

Hello,

I had a hard disk failure some time ago, and I ended up losing
/var/db/pkg/ and everything under it (before you say I should've been
backing it up, I know, I was actually doing an initial full when this
happened). Is there a way I can restore it, or at least manually add
entries I know for sure about?


look in /var/db/pkgdb.bak.tbz

  ^^^
ITYM /var/backups/pkgdb.bak.tbz.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Lost /var/db/pkg

2012-06-12 Thread William Orr
Hello,

I had a hard disk failure some time ago, and I ended up losing
/var/db/pkg/ and everything under it (before you say I should've been
backing it up, I know, I was actually doing an initial full when this
happened). Is there a way I can restore it, or at least manually add
entries I know for sure about?

Thanks,
Will Orr

(Please cc me on the replies, as I'm not subscribed to the list)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org