FORUMS

[GUIDE][Difficulty: Intermediate] Weekly TWRP Backups

932 posts
Thanks Meter: 2,019
 
Post Reply Email Thread
9th March 2016, 09:30 PM |#11  
Follow_and_Feel's Avatar
Senior Member
Flag Montabaur
Thanks Meter: 216
 
More
So as I stated above this worked pretty well for me (it made the backup, rebooted me), but if I now go into tasker the "make-backup"-profile is gone?! This seems pretty pointless, if I have to set up the whole thing every time I use it ^^
9th March 2016, 10:25 PM |#12  
Arstoien's Avatar
Senior Member
Thanks Meter: 1,517
 
More
Quote:
Originally Posted by Follow_and_Feel

So as I stated above this worked pretty well for me (it made the backup, rebooted me), but if I now go into tasker the "make-backup"-profile is gone?! This seems pretty pointless, if I have to set up the whole thing every time I use it ^^

Obviously you need to exit Tasker once, to save the profile. If you enter all actions in the task and run the task manually, it'll restart your phone without Tasker having saved what you've done.
10th March 2016, 12:40 AM |#13  
Follow_and_Feel's Avatar
Senior Member
Flag Montabaur
Thanks Meter: 216
 
More
Quote:
Originally Posted by Arstoien

Obviously you need to exit Tasker once, to save the profile. If you enter all actions in the task and run the task manually, it'll restart your phone without Tasker having saved what you've done.

Oh haha thank you! Stupidity at its best thanks
The Following User Says Thank You to Follow_and_Feel For This Useful Post: [ View ] Gift Follow_and_Feel Ad-Free
10th March 2016, 01:14 AM |#14  
bagarwa's Avatar
Senior Member
Flag Bothell
Thanks Meter: 2,751
 
More
I do my backup to a usb-otg drive though. What do I need to modify in this profile to make sure that the backup gets stored only on the otg drive and skips entirely if no otg drive is mounted?
10th March 2016, 02:22 AM |#15  
Senior Member
Anaheim
Thanks Meter: 127
 
More
Quote:
Originally Posted by Giblet-dono

No idea.. what I DO know is that this script gave me a hang on boot :<
Make a complete backup before running the script for the first time!
I am not sure yet why, but maybe someone (OP?) can help me out here..
I'm using an HTC One M8 with Marshmallow rom (ViperOneM8) which is stock HTC Sense based.
I use TWRP 2.7.8.0

Did you try to wait longer? I thought mine also bootloop-ed until I remember that the wipe cache & wipe dalvik command would cause the phone to take a while to load. I waited around 10 minutes.

---------- Post added at 05:18 PM ---------- Previous post was at 05:18 PM ----------

Quote:
Originally Posted by bagarwa

I do my backup to a usb-otg drive though. What do I need to modify in this profile to make sure that the backup gets stored only on the otg drive and skips entirely if no otg drive is mounted?

Did you try: http://wiki.rootzwiki.com/OpenRecoveryScript

---------- Post added at 05:22 PM ---------- Previous post was at 05:18 PM ----------

@MishaalRahman I found that you don't have to chmod 0777 in the beginning and you don't have to use "Secure Settings".

I tested to touch the file in tasker and it created the file just fine.

In regards to Secure Settings, I added the task code -> run shell -> 'reboot recovery'
The Following 3 Users Say Thank You to Contivity For This Useful Post: [ View ] Gift Contivity Ad-Free
10th March 2016, 02:37 AM |#16  
bagarwa's Avatar
Senior Member
Flag Bothell
Thanks Meter: 2,751
 
More
Quote:
Originally Posted by Contivity

Did you try: http://wiki.rootzwiki.com/OpenRecoveryScript

That was very educational. Thanks for the link.

Do you know what would be the path for usb-otg?? Would the command be mount usb-otg or something different?

Also, I don't see an option of backing up vendor partition. I do need to backup that, because without that, a restore causing unlocking issue. (Nexus 6P)

Lastly, does Tasker have a way to detect whether a usb drive is plugged in? I would like to add that as one of the trigeers.
10th March 2016, 02:48 AM |#17  
Senior Member
Anaheim
Thanks Meter: 127
 
More
Quote:
Originally Posted by bagarwa

That was very educational. Thanks for the link.

Do you know what would be the path for usb-otg?? Would the command be mount usb-otg or something different?

Also, I don't see an option of backing up vendor partition. I do need to backup that, because without that, a restore causing unlocking issue. (Nexus 6P)

Lastly, does Tasker have a way to detect whether a usb drive is plugged in? I would like to add that as one of the trigeers.

OTG Path - I won't know and can't test right now
Tasker detect USB - you can do a file test and set the variable. then you can use that as trigger or if clause.
10th March 2016, 07:29 AM |#18  
Mdknight's Avatar
Senior Member
Flag South Jersey
Thanks Meter: 52
 
Donate to Me
More
Quote:
Originally Posted by bagarwa

Lastly, does Tasker have a way to detect whether a usb drive is plugged in? I would like to add that as one of the trigeers.

Try using a file explorer to view the path with the usb plugged in. That's what I did to get the full path of my sd card for this to work properly. So far, so good.

---------- Post added at 01:29 AM ---------- Previous post was at 12:33 AM ----------

Quote:
Originally Posted by MishaalRahman

[*]Code --> Run Shell. This is the code you'll need:

Code:
chmod 0777 /cache/recovery
echo "wipe cache\nwipe dalvik\nbackup SDBOM weeklybackup \ncmd reboot" > /cache/recovery/openrecoveryscript

I don't have much experience with running scripts. Is it safe to leave out the "/nwipe dalvik" part? I assume that would just skip wiping Dalvik?
The Following User Says Thank You to Mdknight For This Useful Post: [ View ] Gift Mdknight Ad-Free
10th March 2016, 09:25 AM |#19  
Arstoien's Avatar
Senior Member
Thanks Meter: 1,517
 
More
FYI here are my additions to the Profile:
• Instead of only Sunday, run it every day but execute the backup only if the last backup is at least 1 week old. This removes the chance of having a backup too old because you weren't home Sunday, or you weren't charging that night, etc.
• When booting (only if rebooted from the profile) enter the sim pin code, so you wouldn't miss any emergency phone calls/sms
• If next clock alarm is too soon (say closer than 3 hrs), then don't start a backup
• Log the time and date of backups to a custom log file.
• If by any chance the screen is on while Profile conditions are met, delay the backup by 15 min, so no work is accidentally lost.

If anyone's interested, I'll leave more detailed info on each of the points.
The Following 3 Users Say Thank You to Arstoien For This Useful Post: [ View ] Gift Arstoien Ad-Free
10th March 2016, 09:36 AM |#20  
Senior Member
Flag Ljubljana
Thanks Meter: 16
 
More
...
10th March 2016, 09:54 AM |#21  
Senior Member
Here
Thanks Meter: 649
 
More
Quote:
Originally Posted by Contivity

Did you try to wait longer? I thought mine also bootloop-ed until I remember that the wipe cache & wipe dalvik command would cause the phone to take a while to load. I waited around 10 minutes.

I waited more than 20 minutes to no avail
No idea what went wrong but it's weird :P
Post Reply Subscribe to Thread

Tags
backup, tasker, twrp, weekly

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes