Author Topic: Scheduling with Luckybackup  (Read 2134 times)

0 Members and 1 Guest are viewing this topic.

Emegra

  • Guest
Scheduling with Luckybackup
« on: January 11, 2016, 07:03:12 pm »
Hi guys

Over the past fews days I've been banging my head against a brick wall trying to find a way to back up my home folders (2 user accounts) to a second internal HDD and schedule it to run automatically through the night.

I want the backup to be a straightforward copy so I could restore any individual file or folder without restoring the whole backup.

I've tried various applications such as Backintime Gadmin rsync and one or two others but by far the the best for what I want seems to be Luckybackup it's simple to use and understand and backs up the folders I want the way I want it done providing i do it manually. the problem is i cant get to work automatically with the scheduler, the scheduler is very simple to set up but when the set time come up nothing happens and no errors reported, Luckybackup comes with a very good handbook and followed the instructions letter for letter but it just wont work

I have cron installed but I don't know if the daemon is running or if there is anything else I need to get this to work

Any help or advice would be much appreciated


Graeme

EDIT

This is almost a carbon copy of what I've done and it works ok it's just I can't get to run a a cron job

http://jsmylinux.no-ip.org/backups/luckybackup-overview/home-folder-backup/

I've followed these instructions to the letter and it just doesn't do anything

http://jsmylinux.no-ip.org/backups/luckybackup-overview/automatic-scheduled-backups/


 
« Last Edit: January 11, 2016, 07:49:20 pm by Emegra »

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1814
  • Karma: 138
  • Gender: Male
    • View Profile
    • Awards
Re: Scheduling with Luckybackup
« Reply #1 on: January 11, 2016, 09:06:55 pm »
I have no expeience with Luckybackup, but understand that it uses cron and rsync.
You could check if the entry exists for it in your crontab:
Code: [Select]
crontab -l
this should list the crontab entry’s for the current user
also you could look ~/.luckyBackup/logs/cronLogfile.log
or
Code: [Select]
sudo crontab -l
to see if its is under root.
for root you could look /root/.luckyBackup/logs/cronLogfile.log
[EDIT]
more here
« Last Edit: January 11, 2016, 09:13:08 pm by SeZo »

Emegra

  • Guest
Re: Scheduling with Luckybackup
« Reply #2 on: January 11, 2016, 09:30:22 pm »
Hi Sezo

Thanks for looking at this

Code: [Select]
graeme@Linux1 ~ $ crontab -l
#Back In Time system entry, this will be edited by the gui:
*/10 * * * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1
graeme@Linux1 ~ $

This looks seriously screwed up Backintime was another utility I tried when I couldn't get Luckybackup to work so it looks like some parts of it are still in the system which may or may not be conflicting in some way



Code: [Select]
graeme@Linux1 ~ $ sudo crontab -l
[sudo] password for graeme:
@weekly timeshift --backup
@reboot sleep 10m && timeshift --backup


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 21 * * * env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /root/.luckyBackup/profiles/Home.profile > /root/.luckyBackup/logs/Home-LastCronLog.log 2>&1
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
graeme@Linux1 ~ $

Looks like it is listed under root but it just doesnt work


Here's he output of
Code: [Select]
sudo crontab -e
which lists a Timeshift entry which at least up to now has been working ok

Code: [Select]
@weekly timeshift --backup
@reboot sleep 10m && timeshift --backup


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 21 * * *     env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /root/.luckyBackup/profiles/Home.profile > /root/.luckyBackup/logs/Home-LastCronLog.log 2>&1
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I also followed the instructions here http://jsmylinux.no-ip.org/backups/luckybackup-overview/luckybackup-trouble-shooting/ the tmp folder he's talking about is
Code: [Select]
/tmp/crontab.itPd48/crontab 
  there was a bunch of entries including one Timeshift entry, I cleared them all out except the Timeshift entry then uninstalled and reinstalled Luckybackup to no avail
 
Looks like a tangled web to me I think I'll just run it manually once a week or so


Thanks for your help


Graeme








« Last Edit: January 11, 2016, 09:36:25 pm by Emegra »

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Re: Scheduling with Luckybackup
« Reply #3 on: January 11, 2016, 09:45:51 pm »
Hi, first thing I would say is that I would be somewhat reluctant to use anything with "lucky" in the name when it comes to "backups" ..  :o

Moving on, I use the following script (or minor variations of it) for all of my system backups, and have for many years, and have used it many times (!) for restores, so I have a fairly high degree of confidence in the mechanism. Code looks like this; (note: no needs of potentially 'buggy' products with "lucky" in the name ..  ;) )

Code: [Select]
#!/bin/bash
HOST="$1"
HERE="/vols/backup/servers/${HOST}"
BACK=`date "+%A_%d_%B_%Y_%H"`
EXCL=".excludes"
OPTS="--sparse --force --ignore-errors --delete-excluded --exclude-from=${HERE}/${EXCL}
      --bwlimit=2048 --delete --backup --backup-dir=${HERE}/${BACK} -rvlpgoDtO"
mkdir -p ${HERE}/current
nice -n19 rsync ${OPTS} root@${HOST}:/ ${HERE}/current
So, drop this in /usr/local/bin as backup_script.sh, things you need to know;

To run the script add the following to CRON:

Code: [Select]
* * * 0 0 /usr/local/bin/backup_script.sh <hostname>
Or call from the command line with;
Code: [Select]
backup_script.sh <hostname>
I would recommend a local hosts entry for <hostname> and you will need to make sure HERE exists on the target server, OR, modify HERE to reflect the path you want to back up to. Also, this assumes a complete system backup, modify the root@${HOST}:/ on the last line to start the backup from an alternate location, for example root@${HOST}:/home/mp .

What you will get;

  • A folder called "current" on the target server (which can be 'localhost' !) which is a copy of the source server
  • A folder with a date / time stamp on the target server which are all the files that were displaced on the day of the backup by newer copies
i.e. this effectively provides the features of both FULL and INCREMENTAL backups. You can also put a file in the folder from which the backup is run called ".excludes" into which you can put (one per line) the stuff you don't want, for example on a system backup you'd want things like;

Code: [Select]
/proc
/sys
/tmp
/var/log/*
For local copies you can also tweak or remove the --bwlimit option, however this is invaluable for remote backups. For more details / information or documentation on exactly how it works, take a look at the "rsync" man page.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1814
  • Karma: 138
  • Gender: Male
    • View Profile
    • Awards
Re: Scheduling with Luckybackup
« Reply #4 on: January 11, 2016, 09:53:18 pm »
I am with Mad Penguin, that is largely how I do it too :D

But if you want to carry on with Luckybackup then continue here.

Looks like you are running the root version(see here):
Please note that there 2 links will be created in your menu:
1. For normal user execution.
This is created under Utilities (kde) or Accessories (Gnome) or Applications -> File Management (Debian menu).
2. For super-user execution.
This is created under System (kde) or System Tools (Gnome) or Applications -> System -> Administration (Debian menu).


Try running the normal user version and see if scheduling works (first delete the set schedules in the root version in the Luckybackup GUI)

Emegra

  • Guest
Re: Scheduling with Luckybackup
« Reply #5 on: January 12, 2016, 06:30:51 am »
Hi Mad Penguin

Thanks for your input it will take me a while to digest your solution I'm far from being a power user but I'll give it a go ,

I was looking for a simple GUI solution that I could modify easily anytime I wanted and Luckybackup seemed to provide that but it now appears (thanks to SeZos link) that that the Super user version is broken and I didn't reaiise until reading that link that there was another version hidden away under Menu/Accessories which as it turns out schedules perfectly, the problem now is it wont delete files on the destination even though I've ticked the checkbox to do that in the settings.

On the surface Luckybackup looked like the perfect tool for what I wanted to do but it doesn't do what it says on the tin and if the author is aware of it as in this case why is it not pulled from the repos, it would save unsuspecting users hours of headbanging and pointless frustration

Anyway rant over

Thanks to SeZo and Mad Penguin for your help


Graeme

Offline boaz

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Scheduling with Luckybackup
« Reply #6 on: October 08, 2017, 07:16:46 pm »
I am not much of an expert, but try ticking the console mode in the scheduling tab. It worked for me.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal