ricardomv / snapper-gui

GUI for snapper, a tool for Linux filesystem snapshot management, works with btrfs, ext4 and thin-provisioned LVM volumes
GNU General Public License v2.0
226 stars 32 forks source link

Installed, but cannot run on Ubuntu 18.04 #44

Closed gitowiec closed 3 years ago

gitowiec commented 3 years ago

I am using Ubuntu Budgie 18.04

I followed the steps from README.MD

Here is the error what I see in console:

user@inspiron:~/programs/snapper-gui (master %=)$ snapper-gui 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.opensuse.Snapper': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/snapper-gui", line 11, in <module>
    load_entry_point('snappergui==0.1', 'gui_scripts', 'snapper-gui')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/dist-packages/snappergui/__init__.py", line 9, in <module>
    '/org/opensuse/Snapper'),
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.systemd1.NoSuchUnit: Unit snapperd.service not found.
user@inspiron:~/programs/snapper-gui (master %=)$ 

I am regular user, I now a little about Python, how can I fix/debug this issue? Best regards

rickysarraf commented 3 years ago

I think this error basically means that your snapperd daemon is not running. Or is failing to start when requested.

I don't know about Ubuntu 18.04, but on modern Debian Bullseye and Debian Unstable, the service will be auto-started when someone makes a request over DBus.

What does the below command output give you ?

rrs@priyasi:.../snapper$ snapper get-config
Key                    | Value
-----------------------+------
ALLOW_GROUPS           | rrs  
ALLOW_USERS            | rrs  
BACKGROUND_COMPARISON  | yes  
EMPTY_PRE_POST_CLEANUP | yes  
EMPTY_PRE_POST_MIN_AGE | 1800 
FSTYPE                 | btrfs
NUMBER_CLEANUP         | yes  
NUMBER_LIMIT           | 50   
NUMBER_LIMIT_IMPORTANT | 10   
NUMBER_MIN_AGE         | 1800 
QGROUP                 |      
SPACE_LIMIT            | 0.5  
SUBVOLUME              | /    
SYNC_ACL               | yes  
TIMELINE_CLEANUP       | yes  
TIMELINE_CREATE        | yes  
TIMELINE_LIMIT_DAILY   | 2    
TIMELINE_LIMIT_HOURLY  | 1    
TIMELINE_LIMIT_MONTHLY | 2    
TIMELINE_LIMIT_WEEKLY  | 2    
TIMELINE_LIMIT_YEARLY  | 10   
TIMELINE_MIN_AGE       | 1800 
14:29 ♒ ॐ ♅ ♄ ⛢     ☺ 😄    

A properly set snapper will give you outputs like:

rrs@priyasi:.../snapper$ snapper list
  # | Type   | Pre # | Date                                 | User | Cleanup  | Description | Userdata
----+--------+-------+--------------------------------------+------+----------+-------------+---------
 0  | single |       |                                      | root |          | current     |         
 1  | single |       | Sunday 24 January 2021 02:00:12 PM   | root | timeline | timeline    |         
10  | single |       | Monday 25 January 2021 01:24:55 PM   | root | number   | boot        |         
11  | single |       | Monday 25 January 2021 02:00:02 PM   | root | timeline | timeline    |         
41  | single |       | Thursday 28 January 2021 05:04:40 PM | root | number   | boot        |         
66  | single |       | Monday 01 February 2021 10:57:45 AM  | root | timeline | timeline    |         
80  | single |       | Tuesday 02 February 2021 12:00:10 AM | root | timeline | timeline    |         
92  | single |       | Tuesday 02 February 2021 12:00:14 PM | root | timeline | timeline    |         
93  | single |       | Tuesday 02 February 2021 01:00:15 PM | root | timeline | timeline    |         
94  | single |       | Tuesday 02 February 2021 02:00:15 PM | root | timeline | timeline    |         
14:30 ♒ ॐ ♅ ♄ ⛢     ☺ 😄    

rrs@priyasi:.../snapper$ snapper list-configs 
Config  | Subvolume
--------+----------
etc     | /etc     
homedir | /home/rrs
root    | /        
14:30 ♒ ॐ ♅ ♄ ⛢     ☺ 😄    
gitowiec commented 3 years ago

Hi, thanks for the help. I tested snapper-gui and it runs without problems. Maybe it was the thing You said about snapperd and it got resolved after reboot. After I run snapper-gui I saw that not nowing anything about snapper does not help me. And I got another issue, missing snapper configuration for root... Thanks for the help, closing.