I want to create a mirror of my existing Debian server. I modified many files in /etc, and I don't want to redo everything by hand or download huge mirrors. What I thought of doing is
- Download a list of all files in /etc
- Download a list of all .deb packages installed
Then, on the original server,
- Expand all .deb into /tmp/etc1 and see which /etc files they install
ls /tmp/etc1 > /tmp/listOfOrigEtc
ls /tmp/etc > /tmp/listOfEtc
diff /tmp/listOfEtc /tmp/listOfOrigEtc > /tmp/listOfFilesToDownload
- Download all new etc files
- Using find, see which /etc/ files were modified and download them
Is there a way to do this using a single command?
rsync --dry-run
to find changed files. If modification times aren't good enough, you can usersync --dry-run --checksum
.