Backup flow - need help
Moderator: Martin
Backup flow - need help
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.
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.
Re: Backup flow - need help
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
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
Re: Backup flow - need help
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?
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?
Re: Backup flow - need help
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).
Re: Backup flow - need help
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)?
Or is there any workaround that might work (e.g. using the "execute command" action)?
Re: Backup flow - need help
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.
You could use command cp with option -n (-n no clobber (don't overwrite DEST)) or alternatively use an app like Folder Sync.
Re: Backup flow - need help
Ok, I´ll give the cp command a try.
Re: Backup flow - need help
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.
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.
Re: Backup flow - need help
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.
Re: Backup flow - need help
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.
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.