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

Bug#406131: - Document how to do partial updates for users tight on space

On Tue, Nov 25, 2008 at 03:52:28PM +0100, Giovanni Rapagnani wrote:
> I propose this text for addressing the issue :

Thanks for working on this.

> Remove the packages that have been previously downloaded for installation:
> #  apt-get clean
> Copy the content of /var/cache/apt/archives to the usb key:
> #  cp -ax /var/cache/apt/archives/* /media/usbkey/

I would skip the 'mv /var/cache/apt/archives'step. It might be wiser just to
mount the temporary hard disk over at /var/cache/apt/archives. The original
location will be "hidden" to the filesystem. Then, when the upgrade is
finished you just have to umount the temporary hard disk and you don't have
to restore (i.e. mv /var/cache/apt/archives.orig to /var/cache/apt/archives)

This is my proposed procedure:

> Disable the current archives directory and mount the temporary one over it:
> #  umount /media/usbkey
> #  mount /dev/sdc1 /var/cache/apt/archives
> After the upgrade, clean the disk and 
> restore the original /var/cache/apt/archives directory:
> #  apt-get clean
> #  umount /var/cache/apt/archives

I think that would be the only needed steps.

Notice that an alternate solution (if no external drive is available but
there is sufficiente space in a current drive) is to 'bind mount' a new
location over at /var/cache/apt/archives.

For example, if /home had enough space you could also do this
(untested, but would be done following from after the clean):

# Create a temporary location at /home
mkdir /home/temp_archives
cp -ax /var/cache/apt/archives /home/temp_archives

# Mount the separate space in the file system to replace the archive
# directorio
mount --bind /home/temp_archives/archives /var/cache/apt/archives

[ upgrade ]

# Unmount the temporary space and clean the temporary location
umount /home/temp_archives/archives 
rm -rf /home/temp_archives/



Attachment: signature.asc
Description: Digital signature

Reply to: