在 Debian 上“备份 compton”通常有两种理解,下面分别说明,你可以按需选择。
Compton(现已多被 picom 取代)的配置文件一般在:
~/.config/compton.conf
或更早的:
~/.compton.conf
cp ~/.config/compton.conf ~/compton.conf.bak
# 或
cp ~/.compton.conf ~/compton.conf.bak
如果要整体备份配置目录:
cp -r ~/.config/compton ~/compton-config-backup
cp ~/compton.conf.bak ~/.config/compton.conf
dpkg -l | grep compton
apt-get install --reinstall -d compton
cp /var/cache/apt/archives/compton*.deb ~/
apt-mark showmanual | grep compton
或导出全部手动安装包:
apt-mark showmanual > installed-packages.txt
重装时:
sudo apt install compton
很多 Debian 用户实际用的是 picom:
~/.config/picom/picom.conf
备份方式一样:
cp ~/.config/picom/picom.conf ~/picom.conf.bak
如果你是想“整个桌面环境配置一起备份”:
tar czf debian-home-backup.tar.gz \
~/.config \
~/.local \
~/.xinitrc \
~/.bashrc
如果你能说清楚:
我可以给你更精确的命令。