B2G-flash-tool icon indicating copy to clipboard operation
B2G-flash-tool copied to clipboard

backup_restore_profile.py -b fails if a folder mozilla-profile already exists

Open alex-mayorga opened this issue 9 years ago • 1 comments

backup_restore_profile.py -b seems to bail out if a folder mozilla-profile already exists.

Also the WARNING should be ERROR, flash red or somehow highlight you're about to lose user data.

$ python backup_restore_profile.py -b
2015-08-12 16:46:36,026 - utilities.adb_helper - INFO - restarting adbd as root

2015-08-12 16:46:36,028 - __main__ - INFO - Target device [None]
2015-08-12 16:46:36,042 - __main__ - INFO - Stop B2G.
2015-08-12 16:46:36,197 - __main__ - INFO - Backing up profile...
2015-08-12 16:46:36,200 - __main__ - INFO - Backing up Wifi information...
2015-08-12 16:46:36,348 - __main__ - WARNING - If you don't have root permission
, you cannot backup Wifi information.
2015-08-12 16:46:36,354 - __main__ - INFO - Backing up /data/b2g/mozilla to c:\u
sers\alex\appdata\local\temp\backup_restore_fl9wxo\b2g-mozilla\ ...
2015-08-12 16:46:36,520 - __main__ - WARNING - Can not pull files from /data/b2g
/mozilla to c:\users\alex\appdata\local\temp\backup_restore_fl9wxo\b2g-mozill
a\
2015-08-12 16:46:36,523 - __main__ - INFO - Backing up /data/local to c:\users\a
m74839\appdata\local\temp\backup_restore_fl9wxo\data-local\ ...
2015-08-12 16:46:36,753 - __main__ - WARNING - Can not pull files from /data/loc
al to c:\users\alex\appdata\local\temp\backup_restore_fl9wxo\data-local\
2015-08-12 16:46:36,759 - __main__ - INFO - Backup profile done.
2015-08-12 16:46:36,765 - __main__ - WARNING - Removing [mozilla-profile] folder
...
2015-08-12 16:46:37,180 - __main__ - INFO - Copy profile from [c:\users\alex\
appdata\local\temp\backup_restore_fl9wxo] to [mozilla-profile].
2015-08-12 16:46:37,190 - __main__ - INFO - Start B2G.

alex-mayorga avatar Aug 12 '15 21:08 alex-mayorga

@alex-mayorga

Due to the pvt sever was stopped, we plan to re-write the shell scripts to python and move the tools to PyPI. Could you please help to try b2g_util 0.07 [1]? It will detect the local folder before backup data.

[1] https://pypi.python.org/pypi/b2g_util

askeing avatar Aug 20 '15 13:08 askeing