Unhandled exception in common/snapshots.py:1834 cases hang on "Save Permissions"

Bug #1269991 reported by Ali Ghorashi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Back In Time
Fix Released
High
Germar

Bug Description

As one of the last steps, BiT tries to create a symlink to the last backup in function 'create_last_snapshot_symlink'. But if the backup is done to a CIFS mount, os.symlink will throw an OsERR exception which is not handled. This will cause the app to hang with a "Working: Save Permission" message.
Suggest putting the name of the last backup in a text file instead of a symlink.

Also, when backing up to a CIFS mount, symlinks cannot be backed up. If there was an option to enable the "--no-links" option of rsync and then archive the symlinks separately, then CIFS mount can be used as a backup target.

Ali Ghorashi (aghoras)
summary: - Unhandled exception in common/snapshots.py:1854 cases hang on "Save
- Permissions
+ Unhandled exception in common/snapshots.py:1834 cases hang on "Save
+ Permissions"
Ali Ghorashi (aghoras)
description: updated
Germar (germar)
Changed in backintime:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Germar (germar)
milestone: none → 1.0.36
Revision history for this message
Germar (germar) wrote :

a text file with last snapshot name is not very helpful. The 'last_snapshot' symlink was a wish from guys who want to access the last snapshot over network share.
I added an exception handler to os.symlink so it will fail silently.

If your destination drive (e.g. CIFS) doesn't support symlinks you can enable 'Copy links (dereference symbolic links)' in Options. This will copy those links targets instead of the link itself.

Revision history for this message
Germar (germar) wrote :

until 1.0.36 is released you can use the attached patch with 'sudo patch /usr/share/backintime/common/snapshot.py < ~/Downloads/snapshot.diff'

Revision history for this message
Darin B (darinb6-w) wrote :

ok i am was directed to come to this patch. Sorry about posting in the wrong place.
Please explain for a noobie how to apply this patch? and i don't see any where to download a patch.
thank you
Darin

Revision history for this message
Germar (germar) wrote :

No worries Darin. Just right-click on 'snapshot.diff' in my last comment #2, press 'Save Link As...' and save the file in your 'Downloads' folder.
Next open a terminal (CTRL+ALT+T if you are on Ubuntu), type 'sudo patch /usr/share/backintime/common/snapshot.py < ~/Downloads/snapshot.diff' press ENTER and type in your password.

If you still have questions don't hesitate to ask.

Regards,
Germar

Revision history for this message
Darin B (darinb6-w) wrote :

Hi Germar
I did what you suggested and this is what the results were:
$ sudo patch /usr/share/backintime/common/snapshot.py < ~/Downloads/snapshot.diff
[sudo] password for darin:
patching file /usr/share/backintime/common/snapshot.py
Hunk #1 FAILED at 1827.
1 out of 1 hunk FAILED -- saving rejects to file /usr/share/backintime/common/snapshot.py.rej
darin@darin-Inspiron-560 ~ $

No clue what this means!

thank you again
Darin

Revision history for this message
Germar (germar) wrote :

Oh, sorry. That's my fault. There is a typo in filename. It's snapshots.py and not snapshot.py.

Please try again with:
sudo patch /usr/share/backintime/common/snapshots.py < ~/Downloads/snapshot.diff

Revision history for this message
Darin B (darinb6-w) wrote :

Thank you so much.
It works!!!

Revision history for this message
Darin B (darinb6-w) wrote :

I installed linux mint 17.
I installed backintime from syanaptic 1.0.34
I did what you suggested it worked for a few days. not the problem returned.
I redid the steps again but it does not seem to fix it.
What do you suggest?
thank you

Revision history for this message
Darin B (darinb6-w) wrote :

continuation from above post here is the error message.
========== Take snapshot (profile 1): Sun 27 Jul 2014 12:30:34 PM ==========

[E] Error: rsync: symlink "/media/darin/80BB-B294/backintime/backintime/darin-Inspiron-560/darin/1/new_snapshot/backup/home/darin/Documents/BNI Chapter 31/Link to Fast Track" -> "/home/darin/Desktop/Documents/BNI Chapter 31/Fast Track" failed: Operation not permitted (1)
[E] Error: rsync: recv_generator: mkdir "/media/darin/80BB-B294/backintime/backintime/darin-Inspiron-560/darin/1/new_snapshot/backup/home/darin/Documents/BNI Chapter 31/Visitor Day/Visitor Day " failed: Invalid argument (22)
[E] Error: rsync: recv_generator: mkdir "/media/darin/80BB-B294/backintime/backintime/darin-Inspiron-560/darin/1/new_snapshot/backup/home/darin/Documents/BNI Chapter 31/bni possible new member applications/Neomi Brooklyn real estate broker " failed: Invalid argument (22)
[E] Error: rsync: recv_generator: mkdir "/media/darin/80BB-B294/backintime/backintime/darin-Inspiron-560/darin/1/new_snapshot/backup/home/darin/Documents/Blank Practice Forms/Watson Peter " failed: Invalid argument (22)
[E] Error: rsync: write failed on "/media/darin/80BB-B294/backintime/backintime/darin-Inspiron-560/darin/1/new_snapshot/backup/home/darin/Documents/Chiropractic Documents degrees licenses/Activator V How to master - YouTube.mp4": No space left on device (28)

Revision history for this message
Germar (germar) wrote :

This is not related to this bug. Please check if your dst drive supports symlinks (activate 'Copy links' if not) and if there is enough space left on the drive. If that doesn't help please open a new Question.

Germar (germar)
Changed in backintime:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.