Bug#406131: - Document how to do partial updates for users tight on space
On 26/11/08 15:43, Javier Fernández-Sanguino Peña wrote:
> 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.
Thanks for that. I didn't know it was possible to do it this way.
> 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/
Ok. I will add this possibility in the text.
On 27/11/08 09:14, Andrei Popescu wrote:
On Wed,26.Nov.08, 15:43:17, Javier Fernández-Sanguino Peña wrote:
# Unmount the temporary space and clean the temporary location
rm -rf /home/temp_archives/
How about clean and umount?
This step won't remove the 'partial' directory and the 'lock' file.
I can just write 'remove the temporary directory and its content', leaving to
the user the choice to do it like he wants.
(I tend to avoid any rm -rf ;)
I will update the procedure taking into account your advices. Thank you, both of