Ubuntu – Display changes between old and new server

14.0418.04backupdiff()

I am using a headless Linux server in an off-site location and I access it using ssh.

I tried upgrading to Ubuntu 18.04 LTS 64bit because of the constant nagging that Ubuntu 14.04 was outdated, yet I got a lot of error messages, afterwards. E.G. The mail server did not work any more.

Now, my provider offers a complete reinstall of a working Ubuntu 18.04 LTS 64bit at the expense of removing all data that was there previously.

Is there a diff-tool, that can tell me exactly what differentiates my system from an off-the-shelf Ubuntu 14.04, so I can easily backup only those files I need?

Best Answer

Yes, this is possible, but you need to know what does not exist any more and what is different so:

  1. What does not exist any more:

    rsync --archive --verbose --update --dry-run --delete $szOldServerPath $szNewServerPath | grep "^deleting "
    

    The above command will give you a list of files that do not exist in the new server.

    grep ^deleting because each line prints : deleting ..file..

  2. What is different:

    rsync --archive --verbose --dry-run --checksum $szOldServerPath $szNewServerPath
    

    will give you a list of different files (including new files)

Good luck as depending on how long this server has been running you'll get thousands to millions of files that will be different, so whichever system you're going to use, it's never going to be easy as you requested.

Source

Related Question