[arch-general] Best way to clone install (package selection to another box?)

Daniel J Griffiths ghost1227 at archlinux.us
Wed Apr 22 03:22:08 EDT 2009


David C. Rankin wrote:
> Listmates:
>
> 	If I want to clone my package selection to another box, is there a better way
> to do it other than just parsing the files in /var/cache/pacman/pkg to generate
> a list to feed to pacman after install on the second box? Something like:
>
> for i in $(find /var/cache/pacman/pkg/ -type f); do
> 	TMP=${i##*/}
> 	FILE=${TMP%%-[[:digit:]]*}
> 	echo $FILE >> ~/linux/INSTALLED
> done
>
> 	Then after install on the new box:
>
> pacman --sync --refresh
>
> pacman --sync $( < ~/linux/INSTALLED)
>
>   --or--
>
> while read file; do
> 	pacman --sync $file
> done < ~/linux/INSTALLED
>
> 	I've picked around a bit and can't find a pacman option that is somewhat the
> equivalent to rsync's '--files-from' that would allow me to read the list to
> pass to pacman directly from a file. I don't know if pacman can do something
> like this or how many files it can handle at once if the list of files is piped
> or redirected to it. I don't think the second while loop would work either from
> a dependency perspective, and, the repeated calls to pacman would make it slow
> as hell.
>
> 	What's the current thinking on the best way to do something like this?
> 	
>
>   
If you're looking for something simple, I have a script in the AUR 
called Packup that allows you to backup and restore installed packages.


More information about the arch-general mailing list