A lightweight Python Backup Tool

Contribute code to SolydXK and make it even better.
oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

A lightweight Python Backup Tool

Postby oneleaf » 17 Sep 2014 00:48

Hi there,
I just created a backup GUI tool in Python that people may find useful. I have done some database programming in Python and a little Tkinter GUI, but this is my first time using the GTK+ bindings. I went with GTK3 and used the bindings directly (no Glade) and found the process quite smooth.

https://github.com/oneleaftea/frakkup-backup

Quick feature list:
- Rsync as backend.
- Save and manage backup configurations.
- Incremental backup (transfers only changed and new files)
- Separate timestamped directories for every backup instance (still incremental. Uses hard links via Rsync. The Github page describes the process) each time you run it.
- Sudo available (with password prompt when you click Run)
- Logs and cfg files in ~/.config/frakkup
- Additional options can be entered into the GUI for any Rsync options you want making this as simple or as powerful as you need it to be.

You can run the single python file (frakkup.py) using python3 (make sure it is python3) if you want. No other modules needed, as long as you have the Gtk bindings (usually python-gi and python3-gi should be already installed).

A few screenshots:

Main window:
Image

Backup Job running in Virtual Terminal:
Image

Timestamped backups in destination directory:
Image

Any comments and feedback welcome. I know there are a few backup tools out there, but not one that did exactly what I wanted. I hope others find it useful!

Deleted User 2763

Re: A lightweight Python Backup Tool

Postby Deleted User 2763 » 17 Sep 2014 01:04

That's pretty cool.
I'll give it a try.
-Hinto

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: A lightweight Python Backup Tool

Postby oneleaf » 17 Sep 2014 01:05

There is one minor GUI issue that I ran into on some distros using older versions of PyGObject that may affect some (no issues for actual functionality). Basically, with the newest versions of PyGObject on Ubuntu and probably Debian Testing/Sid, everything works fine. I think the versions available on Debian Stable have an issue where the file chooser cannot be unselected. So when you open the program, it may set both source and destination fields to a random directory instead of being empty. Once you start selecting saved backups, it will, of course, select the correct directories. It just doesn't support having a completely unselected file chooser. Consequently, when you click on New, it is kind of meaningless, because it doesn't clear the file chooser (you can still select what you want and save new backups). Hopefully this only affects people on older software versions, since I don't know anyway around it, as I know the widget methods are correct, since it works on later versions.

User avatar
Arjen Balfoort
Site Admin
Posts: 9286
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: A lightweight Python Backup Tool

Postby Arjen Balfoort » 17 Sep 2014 06:42

That is looking very good!
Are you planning to make it possible to run the jobs as cron jobs?


SolydXK needs you!
Development | Testing | Translations

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: A lightweight Python Backup Tool

Postby oneleaf » 17 Sep 2014 07:24

Schoelje wrote:That is looking very good!
Are you planning to make it possible to run the jobs as cron jobs?
Thanks!
As for cron jobs, it is definitely something I have been thinking about a lot. In fact, I had initially made the program to save to executable bash scripts and then simply run them, which would make it easier to add cron job capabilities later on. But I found config files to assist the other features that I wanted (made the polling thread much easier).

My current plan is to add an option to sync the config files with a bash script in ~/user/bin (basically save or update both a config and a script when you click save). And then suggest the user use the Gnome Scheduler GUI program to manage the cron jobs. I would prefer to let a different program to do the heavy lifting of setting up automated tasks since some cron jobs setups may need to have my program run as root which would affect the user environment and config files.

I am open to any suggestions though. :)

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: A lightweight Python Backup Tool

Postby Zill » 17 Sep 2014 10:17

oneleaf wrote:...I know there are a few backup tools out there, but not one that did exactly what I wanted. I hope others find it useful!
This looks like an interesting exercise but it would be useful to know what the USPs (Unique Selling Points) are for your application. I have used luckyBackup for some time now and found it to be a mature and reliable application that seems to do everything (and more!) that you have in your "quick feature list".

What advantages would there be for a user changing to your new application?

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: A lightweight Python Backup Tool

Postby oneleaf » 17 Sep 2014 16:13

Zill wrote:
oneleaf wrote:...I know there are a few backup tools out there, but not one that did exactly what I wanted. I hope others find it useful!
This looks like an interesting exercise but it would be useful to know what the USPs (Unique Selling Points) are for your application. I have used luckyBackup for some time now and found it to be a mature and reliable application that seems to do everything (and more!) that you have in your "quick feature list".

What advantages would there be for a user changing to your new application?
Good question. Luckybackup is surely more full featured. I guess the main difference is the GUI toolkit, if someone wants a really small gtk3 application and doesn't need all the advanced features.


Return to “Code”

Who is online

Users browsing this forum: No registered users and 1 guest