分类: LINUX
2010-08-13 20:53:10
具体请访问 http;//archlinux.cn
1.首先备份/home分区.
2.备份全局设置,主要是修改过的系统/软件配置文件
/etc/X11/xorg.conf
/etc/abs/abs.conf
/etc/acpi/actions
/etc/fonts/local.conf
/etc/gtk-2.0/gtk.immodules
/etc/hosts
/etc/hosts.allow
/etc/hosts.deny
/etc/inputrc
/etc/laptop-mode/
/etc/locale.gen
/etc/makepkg.conf
/etc/mkinitrd.conf
/etc/network-profiles
/etc/pacman.conf
/etc/profile
/etc/rc.conf
/etc/udev/rules.d/10-network.rules
/etc/httpd/conf/httpd.conf
/etc/squid/squid.conf
/etc/rsyncd.conf
/etc/proftpd.conf
2.恢复以后重新运行的命令
locale-gen
visudo
pppoe-setup
3.PKGBUILD的备份.
在makepkg.conf中修改
export PKGDEST=/var/mypkgs
sudo gensync /var/abs/local /var/mypkgs/custom.db.tar.gz
在pacman.conf中添加
[custom] Server = file:///var/mypkgs
find /var/abs/local -maxdepth 2 -type f ! -name "filelist" >mypkgs
上面将local下子目录中的文件(不包括目录和filelist)路径输入到mypkgs
使用
tar -cjvf mypkgs.tar.bz2 -T mypkgs tar -cjvf sysfile.tar.bz2 -T sysfile
pacman -Q|sed -e 's/ .*[0-9]$/ /g' -e '1 i\pacman -S '|tr -d "\012" >soft chmod +x soft
生成soft文件格式为"pacman -S soft1 soft2 ... softn" 下次运行该脚本即可.