GithubHelp home page GithubHelp logo

alexheretic / apart-gtk Goto Github PK

View Code? Open in Web Editor NEW
65.0 8.0 8.0 3.98 MB

Linux GUI for cloning & restoring disk partitions to & from compressed image files

License: GNU General Public License v3.0

Python 83.90% Shell 14.77% CSS 1.33%
gtk linux-gui partclone restore backup

apart-gtk's Introduction

Apart GTK

Linux GUI for cloning & restoring disk partitions to & from compressed image files, using partclone to do the heavy lifting.


Usage

Install

If you have dependency issues, see the build sections for your distro. The GTK 3.22 requirement means you'll probably need a >= 2017 distro.

Dependencies

  • python >= 3.5
  • python-gobject, GTK >= 3.22
  • pyzmq, humanize, pyyaml
  • polkit - for non-root usage
  • apart-core
    • zeromq >= 4.1
    • util-linux >= 2.28.2
    • partclone
    • pigz
    • lz4 (optional: adds compression option)
    • zstd >= 1.2.0 (optional: adds compression option)

Build on Arch

pacman -Syu --needed python python-gobject python-yaml python-pyzmq python-humanize gtk3 partclone zeromq rustup git pigz polkit lz4 zstd

Follow build steps below.

Build on Ubuntu >= 17.04

Build deps: apt install build-essential git libzmq3-dev curl pkg-config python3 + rustup

Run deps: apt install policykit-1 partclone pigz python3-humanize python3-zmq python3-yaml libgtk-3-0 liblz4-tool zstd

Follow build steps below.

Build on Fedora >= 25

dnf install git zeromq-devel rust cargo python3-zmq python3-yaml python3-humanize pigz polkit gtk3 lz4 zstd

Install partclone, ie with something like

wget https://forensics.cert.org/fedora/cert/25/x86_64//partclone-0.2.90-1.fc25.x86_64.rpm
rpm -Uvh partclone-0.2.90-1.fc25.x86_64.rpm

Follow build steps below.

Build

Run ./configure then make having installed the above build dependencies

Manual Install

After building run make install which copies the build made in ./target to /usr

/usr
├─ bin
│  └─ apart-gtk
├─ lib/apart-gtk
│  ├─ apart-core
│  └─ src
│     ├─ app.py
│     └─ ... python files
└─ share
   ├─ applications/apart-gtk.desktop
   ├─ icons/hicolor/scalable/apps/apart.svg
   ├─ icons/hicolor/48x48/apps/apart.png
   └─ polkit-1/actions/com.github.alexheretic.pkexec.apart-gtk.policy

make uninstall can be used to remove these files

Run in test mode

With the dev dependencies installed run ./start-test-app to run from src/ a version of the code with partclone & partition info mocked. This is useful for GUI development, as you can clone and restore without data risk.

Simply using ./start will run against real disks using a dev version of apart-core useful when testing changes to the core.

apart-gtk's People

Contributors

alexheretic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apart-gtk's Issues

Deb package description contains <b></b> tags in title

I just installed the latest version (v0.25) and it looks like there are some HTML tags stuck in the title text. I'm using the Eddy package manager on Pop_OS! and the full text when installing is <b>GUI for cloning & restoring disk partitions to & from compressed image files</b>

thread 'main' panicked

I just installed apart-gtk 0.24-1 from the AUR on Manjaro GNOME:

❯ apart-gtk
thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node<yaml::Yaml, yaml::Yaml>` uninitialized, which is invalid', /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/mem/mod.rs:671:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node<yaml::Yaml, yaml::Yaml>` uninitialized, which is invalid', /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/mem/mod.rs:671:9
stack backtrace:
   0:     0x556db645bdb4 - <unknown>
   1:     0x556db63ed77c - <unknown>
   2:     0x556db6458c02 - <unknown>
   3:     0x556db645d765 - <unknown>
   4:     0x556db645e019 - <unknown>
   5:     0x556db645d96e - <unknown>
   6:     0x556db645c44c - <unknown>
   7:     0x556db645d90d - <unknown>
   8:     0x556db63ec211 - <unknown>
   9:     0x556db63ec15d - <unknown>
  10:     0x556db6485a0c - <unknown>
  11:     0x556db63ce2ae - <unknown>
  12:     0x556db63e174a - <unknown>
  13:     0x556db63e38c4 - <unknown>
  14:     0x556db63ddeb0 - <unknown>
  15:     0x556db63cccef - <unknown>
  16:     0x556db63dc53f - <unknown>
  17:     0x556db645e640 - <unknown>
  18:     0x556db63de0e2 - <unknown>
  19:     0x7f4a467e2b25 - __libc_start_main
  20:     0x556db63c507e - <unknown>
  21:                0x0 - <unknown>
thread panicked while panicking. aborting.

Running with RUST_BACKTRACE=1 produced exactly the same output.

Support Fedora

Should be able to support >= current Fedora with a rpm package. Need a script to create one from source.

clone directly to disk?

i see i have the option to save to file
but i do not see how do i clone directly to destination block device
is this possible? if not, is it on the roadmap?
thanks!

Send system notification when tasks are complete

For longer running backups/restores that are left in the background it would be nice to see a system notification when the task(s) are complete.

  • Don't send if the total runtime was very short
  • Only send once at the end of all running tasks if possible

Persist history during run

Currently history is persisted on exit. If the app is killed the history won't be up to date even for jobs completed a while before the kill.

The app should update the history after each job success, or at some point during a run to prevent this.

Unable to run apart-gtk on CentOS 7.x

Hi,
I have managed to compile apart-gtk on a CentOS 7.9 machine, but it doesn't run. All the required dependencies are satisfied, I have also manually upgraded python36-zmq (and zeromq), but the following error msgs are produced:

Case-1: required deps (zeromq 4.1.4 provided by distro) along with manually upgraded python36-zmq v15.3.0

$ apart-gtk 
[2023-05-09T07:32:36Z ERROR apart_core] Core failed: json invalid: Unexpected end of JSON
Traceback (most recent call last):
  File "/usr/bin/apart-gtk", line 60, in on_status_msg
    self.on_delete()
  File "/usr/bin/apart-gtk", line 93, in on_delete
    self.core.kill()
  File "/usr/lib/apart-gtk/src/apartcore.py", line 101, in kill
    self.socket.send_string('type: kill-request')
  File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 420, in send_string
    return self.send(u.encode(encoding), flags=flags, copy=copy)
  File "socket.pyx", line 636, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:6262)
  File "socket.pyx", line 683, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:6027)
  File "socket.pyx", line 206, in zmq.backend.cython.socket._send_copy (zmq/backend/cython/socket.c:2548)
  File "socket.pyx", line 201, in zmq.backend.cython.socket._send_copy (zmq/backend/cython/socket.c:2437)
  File "checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7015)
zmq.error.ZMQError: Socket operation on non-socket

Case-2: with manually upgraded zeromq (v4.3.4) and python36-zmq v22.3.0

$ apart-gtk 
[2023-05-09T09:43:26Z ERROR apart_core] Core failed: json invalid: Unexpected end of JSON
Traceback (most recent call last):
  File "/usr/bin/apart-gtk", line 60, in on_status_msg
    self.on_delete()
  File "/usr/bin/apart-gtk", line 93, in on_delete
    self.core.kill()
  File "/usr/lib/apart-gtk/src/apartcore.py", line 101, in kill
    self.socket.send_string('type: kill-request')
  File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 718, in send_string
    return self.send(u.encode(encoding), flags=flags, copy=copy, **kwargs)
  File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 547, in send
    return super(Socket, self).send(data, flags=flags, copy=copy, track=track)
  File "zmq/backend/cython/socket.pyx", line 718, in zmq.backend.cython.socket.Socket.send
  File "zmq/backend/cython/socket.pyx", line 759, in zmq.backend.cython.socket.Socket.send
  File "zmq/backend/cython/socket.pyx", line 135, in zmq.backend.cython.socket._check_closed
zmq.error.ZMQError: Socket operation on non-socket

Am I missing something. Thanks in advance.

cannot restore

POP Linux
Mapped NTFS source disk (local)
after selecting image file getting following error in terminal:
ERROR apart_core::server] RestoreJob creation failed: /usr/sbin/partclone.ntfs.81.4GiB not found
Probable cause: file was renamed manually
Without renaming restore works fine

Backup current partition

Hi,

I have 3 different partitions with Lubuntu 14.04 (sda3) / 16.04 (sda2) and 17.10 (sda1),
I installed apart-gtk on sda1 (17.10), I backup the other two partitions, but
how do I backup 17.10 now ?

Support Debian/Ubuntu

The GUI should work with Ubuntu >= 17.04. Need to create a .deb building script from source.

Group matching/similar clones in history

Since clones are generally meant to be rerun again and again over time, it'd be nice for the history view to allow managing these more easily.

The history is currently a list ordered with the most recent task at the top.

v0.16

History

  • sda1 arch -> /mnt/backups - 2 days ago
    • Image file arch-2017-09-11...
    • Image size 6 GiB
    • Runtime 0:02:00
  • sda2 ubuntu -> /mnt/backups - 2 days ago
  • sda1 arch -> /mnt/backups - 9 days ago
  • sda2 ubuntu -> /mnt/backups - 9 days ago
  • sda1 arch -> /mnt/backups - 16 days ago
  • sda2 ubuntu -> /mnt/backups - 16 days ago

For this kind of usage it'd be more useful to group, something like:

future version

History

  • sda1 arch -> /mnt/backups - 2 days ago (3 total)
  • sda2 ubuntu -> /mnt/backups - 2 days ago (3 total)

Which would expand on a single click to:

future version

History

  • sda1 arch -> /mnt/backups - 2 days ago (3 total)
    • 2 days ago
      • Image file arch-2017-09-11...
      • Image size 6 GiB
      • Runtime 0:02:00
    • 9 days ago
      • Image file arch-2017-09-04...
      • Image size 5.9 GiB
      • Runtime 0:02:02
    • 16 days ago
      • Image file arch-2017-08-28...
      • Image size 5.8 GiB
      • Runtime 0:01:54
  • sda2 ubuntu -> /mnt/backups - 2 days ago (3 total)

This grouping will only be for successful clones. Restores, in progress & failed ones will still be separate.

It should pave the way for a little group management too, ie delete all/clear all (in the example deleting/forgetting all 3 clone images). Also some conveniences like a settings for 'keep latest n clones after re-running'

Simplify historic task options to a single button

Currently we have a button per action on a historic task. This takes up room, introduces visual inconsistency and is difficult to add to.

Instead a single 'burger' menu button with text actions could address the above issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.