CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

Back to wiki start page

Categories: Ports

Backing up packages before upgrading/removing

Author

Lucas Hazel

Description

This article will describe a way to backup ports before upgrading to a new version.

Scenario

You've just upgraded a port...uh oh!! You hadn't tuned /etc/pkgadd.conf correctly and all your configuration files have been wiped.

Alternatively, you've removed a port and all of a sudden everything breaks and for one reason or another you don't have the previous version as a package. You just want to get things working...fast. No time to find the bug, just get things working!! Clients are starting to call....AAHH!!

Don't you wish you had backed up that port before doing anything?

Instructions

1. Get the latest sources from my git repository

git clone git://die.net.au/crux/tools/pkg-backup.git

Browse the code

2. Build and install the package

# cd pkg-backup; pkgmk -i

3. Update prt-get.conf, make the following changes

addcommand pkgadd-wrapper
removecommand pkgrm-wrapper

Now whenever prt-get removes or updates a package, a backup will be made to /var/cache/pkg-backup. You can also do manual backups.

pkg-backup glibc