BackInTime for Debian Stretch Server

Discussion in 'Server Operation' started by Martin7000, Apr 6, 2019.

  1. Martin7000

    Martin7000 New Member

    I installed a Stretch Perfect Server as per HowtoForge...everything went perfect. The server is running like a top. So - I figure it's a great opportunity to create a backup so that when the wheels go off the track...it's an easy step back. I looked at the HowtoForge article on
    dd (https://www.howtoforge.com/tutorial/linux-dd-command-clone-disk-practical-example/) and
    Rsyncbackup (https://www.howtoforge.com/scheduled-backups-with-rsyncbackup-debian-etch). What I'm trying to accomplish is taking a 4 drive raid 5 (~693GB) and insanely back it up on a 125GB (114.6) Sandisk stick. With that burped out...there is less than 10GB of Server and email/FTP/Website in use out of the 693GB. Looking at BackInTime it seems to backup only used space on an array and it does incremental backups...so using my 10GB example I could easily get 5 backups on a stick and then - worst case copy data off and start again.
    I got BackInTime-qt4 installed but have hit a snag with a python error (?? authorization error) that is: app.py cannot connect to X server 0.0 .
    Any assistance would be great. Thanks upload_2019-4-6_10-34-10.png upload_2019-4-6_10-55-38.png
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Looks like backintime requires X server, that is a Graphical user interface. You do not have those on your server host, if you followed the Perfect server guide. And it would be a bit foolish to install Gnome or KDE there. My guess is it is meant for desktop systems rather than servers.
    That said, if you installed backintime-qt4 with apt-get, you should have all components necessary to run it. But maybe the X Window System is not started? Or you run it as wrong user?
    I would use Clonezilla for disk image backups, it does compress the image and copies only the used blocks from disk so should get reasonably sized disk image files. But Clonezilla requires booting host from Clonezilla disk to run the image backup so not what you try to accomplish.
     
  3. Martin7000

    Martin7000 New Member

    Thanks Taleman. I've used Clonezilla with Ubuntu and Windows (7 and XP)...it's definitely a great program. I usually use for creating images for VMs. I'll log in as a base user and give that a shot. I've tried the export Display: 0.0 with no luck and Xauthorization...again with no luck. I suspect you are right that the display is not available on the server...and so backintime is more a desktop/client system. I figured it's worth a shot trying to get this setup working as it's low level cost/tech...if it works. There's always someone - who's seen something that might get this insanity to take flight ;)
     
  4. Martin7000

    Martin7000 New Member

    upload_2019-4-6_11-26-7.png No luck as adm either...
     
  5. Martin7000

    Martin7000 New Member

  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Sure, but apt-get install backintime-qt4 should have installed the necessary X Window system components. Have you rebooted the host after installing? What is in /var/log/Xorg.0.log? If you log in from the graphical login prompt, then you can start backintime-gt4.
    Is your screenshot from console terminal or from X Window graphical terminal? From the latter it should work right away. From the first you need to have a GUI session running and use the correct -display argument to connect to it. But still the backintime-gt4 window opens in the GUi session, not in the terminal.
    Maybe use vnc or similar to get the GUI session to show on your workstation display.
     
  7. Martin7000

    Martin7000 New Member

    I did reboot after install and just to make sure I rebooted again. /var/log/Xorg.0.log = not created upload_2019-4-6_17-32-45.png
    I've never logged in from a graphical login prompt...honestly don't know how to login via graphical prompt. Screen captures are via putty. I have tried initiating "backintime-qt4" from display 0.0 (i.e. terminal - not putty) with the same results. My understanding of DISPLAY is rudimentary in that I believe 0.0 is monitor @ server and 10.0 (and variations) are through remote access (e.g. putty). Your comment on "GUI session running" - I suspect is my first mistake. I assume since there is no Xorg.0.log...I haven't got a GUI session established. WRT VNC - how would I establish a VNC connection to my server?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Maybe we are solving the wrong problem here? I looked up what backintime does, and it's not making disk image backup as I first thought. So trying to use this GUI system on a server host that does not have display and keyboard attatched is a bit going to contortions.
    I use BackupPC for backups, it uses rsync like backintime and stores a file only once if it has not been changed between backups, like backintime so you could still fit backups to that memory stick.
    There is Tutorial: https://www.howtoforge.com/linux_backuppc
    The snag here is that since you wrote using Putty, you have a Windows workstation? You need a Linux or Unix host to run BackupPC. But that may be easy to get, I run BackupPC at home on a slow PC with 1 GB memory, I just swapped to disk drive to bigger to have space for backups. But BackupPC is very frugal with disk space, so if you host has 10 GB of files to be backed up, my guess is you might get along with 20 GB disk space for BackupPC and fit a months worth of daily backups there.
    You could even install BackupPC on that host to be backed up, but then your backups would be on the same host which is not very good.
    There is a list of available backup applications for Debian, if BackupPC is not to your liking:
    https://wiki.debian.org/BackupAndRecovery
     
  10. Martin7000

    Martin7000 New Member

    Yes - Windows 7 is what I use Putty on. I do have a keyboard and monitor hooked up to the server. I get the same: app.py: cannot connect to X server :0.0 error whether I am at monitor with keyboard or with Putty. I'll definitely read up on VNC...I did a quick scan. I do have a Ubuntu machine that I can use for access. I've used it for TFTP into some Cisco routers, etc. BackupPC looks very similar to BackInTime as per your link ( https://www.howtoforge.com/linux_backuppc_p2 ). So, I'll do that route if needed. I can easily do this setting up at a terminal and once the backups are established - not access BackInTime via Putty. Just to beat the dead horse thoroughly - could the error app.py: cannot connect to X server :0.0 be a permissions issue? Or can I simply "configure" BackInTime without the gui? upload_2019-4-7_16-9-14.png
    upload_2019-4-7_16-10-49.png
    I've dug around via Google but haven't had much luck (I assume since the gui is available - nobody will setup BackInTime via terminal commands) finding format for establishing a "profile" and configuring the backup - e.g. source and storage parameters. The commands work - as my screen captures demonstrate. Lastly, I did see the dpkg for X11-common were installed (so you were correct when you noted they should be installed with BackInTime. upload_2019-4-7_16-21-17.png
     
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I tested backintime-gt4. Looks like apt-get install backintime-gt4 does not install display manager, so console does not get graphical login prompt. This confirms to me the package is meant for desktops, not servers.
    But you can install a GUI on your server, although it is a bit not optimal only to get backups going. LXDE is light desktop, does not use much memory etc. Easy way to get it installed with all required packages is to use as root command tasksel.
    Code:
    tasksel
    The turn on "Debian desktop environment" and "LXDE" in the screen it displays. OK and wait stuff getting installed. The reboot, and you get graphical login screen. Log in as user that is not root.
    Backintime is in one of the menus you get from lower left corner of display.
     
  12. Martin7000

    Martin7000 New Member

    Taleman - you hit the nail on the head. Thank you. I had been banging around on Sunday and spent Monday + Tuesday undoing my play work. Readers digest I had looked at a similar avenue but with Xorg. So - Everything went slick as you described above. I had an extra "OK" in the middle of the install - for "users" - which was simply hitting OK without any selections. I have screen caps and "monitor pictures" if anyone needs more detail if they go down this road. In my case, the Sandisk usb was formatted fat (assume 32?) and I had to format to ext4 to work with BackInTime. The last curveball I had was - login non root but had to run BackInTime (root) as the program would read disk using non root/sudo user. I completed the first backup (4.5GB) an hour ago. upload_2019-4-11_16-11-51.png
     
    Taleman likes this.

Share This Page