wting / flyback

Automatically exported from code.google.com/p/flyback
0 stars 0 forks source link

flyback --back doesn't work without a windowing system #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Log into a terminal only
2. Run your flyback backup, e.g. flyback.py --backup
3. Get errors:

Traceback (most recent call last):
  File "/usr/local/bin/flyback/flyback.py", line 72, in ?
    from backup_backend import *
  File "/usr/local/bin/flyback/backup_backend.py", line 41, in ?
    import gobject, gtk
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 45,
in ?    from _gtk import *
RuntimeError: could not open display

What is the expected output? What do you see instead?
The expected output is a moderately verbose output telling you about the
backup, which is what happens from a terminal in a graphical login.  

What version of the product are you using? On what operating system?
v0.5.0 on Ubuntu Dapper Drake

Please provide any additional information below.
flyback never works in my crontab file - I think this is the underlying
cause.  

Original issue reported on code.google.com by grant.in...@gmail.com on 24 Jan 2008 at 2:45

GoogleCodeExporter commented 9 years ago
Same problem here, running the backup as root on a Fedora 6 box

Original comment by ethanzo...@gmail.com on 24 Feb 2008 at 1:05

GoogleCodeExporter commented 9 years ago
Same here on a headless debian etch.

Original comment by Toni.Ele...@gmail.com on 25 Feb 2008 at 11:59

GoogleCodeExporter commented 9 years ago
it currently doesn't work headless.

Original comment by pub...@kered.org on 5 Dec 2008 at 9:19

GoogleCodeExporter commented 9 years ago
I am getting a similar error when trying this from a cronjob.
So how do you guys get it to work in cron?

Original comment by WLigtenb...@gmail.com on 30 Aug 2009 at 10:24

GoogleCodeExporter commented 9 years ago
I never managed it! 

I ended up up using "back in time"[1] which came packaged with the latest 
Fedora.  I
also in the past used rdiff-backup[2] and got that to work with a cron job.

1. http://backintime.le-web.org  
2. http://rdiff-backup.nongnu.org/

Original comment by grant.in...@gmail.com on 7 Sep 2009 at 4:18

GoogleCodeExporter commented 9 years ago
I solved this by installing xvfb which is essentially a /dev/null Xwindow and  
prefixing the crontab entry with xvfb-run

My crontab entry now reads

0 3 * * * xvfb-run python /opt/flyback/flyback.py --backup

Original comment by espi...@gmail.com on 28 Mar 2011 at 12:15