Home / Community / Blog / Backup Android device using BackupPC

Backup Android device using BackupPC

After you manage to ssh to your android device. You can set it up to backup with BackupPC.

Since rsync command is not available You can use tar. In configuration you have to set:

$Conf{XferMethod} = 'tar';

change path to tar:

$Conf{TarClientPath} = 'tar';

and command to execute:

$Conf{TarClientCmd} = '$sshPath -q -x -n -p 2222 $host env LC_ALL=C $tarPath -c -v -f - -C $shareName+';

as you can see I've removed -l root and --totals.

Complete config is:

$Conf{XferMethod} = 'tar';
$Conf{TarClientPath} = 'tar';
$Conf{TarShareName} = [
  '/storage/emulated/0/DCIM/Camera/'
];
$Conf{TarClientCmd} = '$sshPath -q -x -n -p 2222 $host env LC_ALL=C $tarPath -c -v -f - -C $shareName+';

There are still some problems because backup is ended with an error:

Running: /usr/bin/ssh -q -x -n -p 2222 huawei_p10 env LC_ALL=C tar -c -v -f - -C /storage/emulated/0/DCIM/Camera .
full backup started for directory /storage/emulated/0/DCIM/Camera
Xfer PIDs are now 19406,19405
(...)
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 78 filesTotal, 227795841 sizeTotal
Backup aborted ()
Not saving this as a partial backup since it has fewer files than the prior one (got 78 and 0 files versus 1814)

Comments

Log in or create a user account to comment.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31