Backup flow - need help

Post your questions and help other users.

Moderator: Martin

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Backup flow - need help

Post by eldron » 04 Sep 2015 14:14

Hi
i have created a little backup flow that i want to use to backup files from one folder to another (on an external drive). The flow just creates a new folder and copies the files, which both works just fine.
My problem is that i would like some confirmation that all the files have been copied. Is it possible to create a status notification that tells me that the job is done and how many files (and MB) have been copied?
Ideally it would also tell me how many files and MB are in the source folder, so i could quickly compare the two figures.
I want to use this flow to backup pictures during a holiday from the camera sd card to a USB stick using a usb OTG adapter connected to my phone.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 05 Sep 2015 10:40

Hi,

You could add an action Notification on Statusbar to the flow to show when the copy action has finished. The copy action should stop with an error when something goes wrong.
Action Init Variables File Info can be used to check the size of a directory (enable recursive for directory).

Regards,
Martin

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 06 Sep 2015 11:06

Thanks for your help, works like a charm now.
If I do the same copy job twice, will it only add new files or overwrite everything? Would there be a command to only copy new /changed files?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 06 Sep 2015 14:25

The action also copies existing files and overwrites the target (even if the files are identical). It's on my todo-list to provide some options to prevent this (probably based on existence, timestamp, size or hash).

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 23 Sep 2015 20:59

Any idea yet, as to when the option to only copy new/changed files might be implemented?
Or is there any workaround that might work (e.g. using the "execute command" action)?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 24 Sep 2015 18:56

No, I don't have a schedule. It's not in the next version so it will at least take several weeks until I even have a chance to work on this.
You could use command cp with option -n (-n no clobber (don't overwrite DEST)) or alternatively use an app like Folder Sync.

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 24 Sep 2015 20:22

Ok, I´ll give the cp command a try.

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 24 Sep 2015 21:24

Hi again,
i managed to get the cp command to work, but the -n returns an invalid option error.
I can use -R or -i (without prompts though) without an error. Any idea why -n (also tried -u) return an error?
Without the -n option working, i might as well use the automagic copy function :-(
I am using the execute root command action.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 27 Sep 2015 17:50

It sounds like the cp command of your ROM does not support the -n option, maybe it was added in a more recent version of Android. You could try installing busybox and see if it supports the -n option.

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 27 Sep 2015 19:15

Hi Martin,
I just installed busybox, but it doesn´t make a difference. I checked the cp command options available in busybox and it does not list -n or -u .
I am on lollipop (S4, Stock ROM), so I don´t think an outdated ROM is the issue.

Post Reply