How to backup everything installed on a Debian server

Firstly, I apologise if my question is a stupid question.
I configured Duplicati using the docs, successfully, on my Debian 11 server.
I am now trying to find a way to backup everything I installed on my server, without the things that are natively installed (to reduce the amount of data, especially useless).
I am just wondering if a way to do this exist, because if I just backup “/”, after counting the files, Duplicati says that there is 128 TB of data in the status bar (even if I have only 13 GB used on 20 GB). And obviously it would not be smart to backup a lot of things that don’t need to.
Thank you for your help!

The idea of ‘natively installed’ is not included in Duplicati selection criteria. For a Debian server, it would need to distinguish between things installed through the Debian tool (apt) and the rest. There is no easy way to do that in an operating system independent way (Duplicati works under Windows, Mac and Linux).
What you could do is to backup directories known to hold user files (such as /home and /opt for example). It’s a matter of adding several backup sources.

You have already posted about that, I don’t see a way to solve it based on the information you provide.
The amount of data remaining to backup is calculated on files found while scanning the disk(s). I don’t see an easy way to find from where your 128 TB total is coming. Maybe you could try to backup /home first and see if it finds something more sane ?

1 Like

you should know your server setup and what file you should preserve.

Of course you must backup /home and /etc/ directory - it should be sufficient if you use standard software. Some programs could be store the executables and data in /opt directory.

Last but not least /var/log directory could be a good idea - if something go wrong a log analysis is mandatory.

1 Like

Thanks to those who gave their thoughts. I’m more familiar with the art of backing up on Windows.
There’s much information on the web on the various Linux directories, and a bit on how to backup.

What directories do I need to back up? has quite a variety of thoughts you can read, if you wish to. Specific situtations can change things, so you still need to think about what’s worth it in your case.

It’s pretty easy to reinstall the OS, and even the packages you install later. Harder to replace is the irreplaceable data that you or some process or program create, so it can take some thought there.

System configuration is probably somewhere in the middle. Lots of times a fresh start might be OK.

Even harder, and I’m surprised it gets asked rarely, is how to use the backup to reassemble things.
Home directory or Windows Documents are simple, but after that, it depends on what software did.

Unlike with an image backup, you can’t just slam the file backup onto the drive and have it all work. Sometimes having the details and files around is still useful as reference, as you plan the recovery.

Better yet is planning in advance, and of course testing the recovery plan to some extent is good…
There’s some happy medium between backing up too much, and regretting that you missed things.

I multiply backup my PC with a highly fine-tuned frequent backup plus some rare get-a-lot backups.