Backing up MacPorts directories

Lawrence Velázquez larryv at macports.org
Tue May 26 10:11:33 PDT 2015


On May 26, 2015, at 7:11 AM, Steve Holden <steve at coordinated.org> wrote:

> Is it recommended to omit any of the directories under
> ‘/opt/local/var/macports’ from backups (e.g. ‘distfiles’, ‘sources’)?
> https://guide.macports.org/#internals.hierarchy
> 
> Whilst I’d like a fully-functioning MacPorts installation if I have to
> boot from or restore from a backup drive, I wondered whether any of
> its build directories could be safely omitted? Would their contents be
> re-downloaded or re-built automatically (or could they be manually)?

You can probably omit these.

- var/macports/build: A scratch directory for port builds. There
  shouldn't be anything in there, unless a build was interrupted and you
  didn't run `port clean` afterwards.
- var/macports/distfiles: A cache for ports' source distributions.
  MacPorts will redownload anything it can't find here.
- var/macports/logs: MacPorts' logs.
- var/macports/sources: Contains the ports tree and MacPorts base source
  code. I believe `port selfupdate` repopulates this, so you need not
  back it up.

vq


More information about the macports-users mailing list