Install the ADB tools

Enable Developer mode on the smartphone

Connect the phone to the Linux system.

It is needed to enable the developer mode on the smartphone. This can be done by going to "Settings" => "More" => "About device" => tap on "Build number" until you get a message saying that the developer mode was enabled.

The new entry "Settings" => "More" => "Developer options" will appear. You need to check the "USB debugging" box.

The smartphone will ask if you want to connect to the PC, you need to answer "yes".

Do the backup

On the Linux system can run the command "adb" without arguments to see all the possible options.

[root@localhost ~]# adb
Android Debug Bridge version 1.0.32
...
-s - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
...
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
...
device commands:
...
adb backup [-f ] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] []
- write an archive of the device's data to .
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
( is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore - restore device contents from the backup archive
adb help - show this help message
adb version - show version num
...
[root@localhost ~]#