Systemback.sh - Crontab

Asked by Ken Krippeler on 2019-10-13

Hi,
Systemback.sh is working fine.
I tried to create a crontab for it, but it doesn't work. I did the following:

sudo -i

crontab -e

Writing:
0 4 * * * root /usr/local/bin/systemback.sh -n

It didn't work. I created another script with /usr/local/bin/systemback.sh -n and named it newsystembackup.sh in case crontab wouldn't recognize parameters. So that would be the following line in crontab:

0 4 * * * root /usr/local/bin/newsystembackup.sh

That didn't work either. I tried it with the word root and without it.

Do you know what I have to do, so it would work?

Another thing is, running the backup the second time it is a lot faster, but the size of the second file is of similar size than the first one. Is that normal? Shouldn't it be a lot smaller than the first backup due rsync using linking for files, so they would take much less space?

Question information

Language:
English Edit question
Status:
Solved
For:
Systemback Edit question
Assignee:
No assignee Edit question
Solved by:
Ken Krippeler
Solved:
2019-10-13
Last query:
2019-10-13
Last reply:
2019-10-13
Kendek (nemh) said : #1

I tried with

* * * * * root /usr/local/bin/systemback.sh -n

and worked fine. This creates a new restore point at every minutes.

Your setting means:
https://crontab.guru/#0_4_*_*_*

The restore points are incremental, which means that the Systemback uses hard links.
Check the bin/bash for example:

ls -l SB01_*/bin/bash

You can see the number of links right after the file permissions.

Ken Krippeler (lichtverbunden) said : #2

I tried that as well, but it doesn't work either. Is that because I use ubuntu-server?
I tried using crontab -e with my normal user and the one with root. Neither of them works.
Strangely enough I set up a crontab a while ago for automatically updating packages and that is working...

What does it mean when hard links are used? Is the second backup the same size as the first one or much lesser?

Kendek (nemh) said : #3

I just edited the /etc/crontab file.

Better if you read what the hard link is:

https://en.wikipedia.org/wiki/Hard_link

Ken Krippeler (lichtverbunden) said : #4

Adding it via /etc/crontab worked. Thank you!

I'm still irritated by the hard link topic. I understand that it creates that hard link and when one file is changed the other one will too. But do they take space on their own? When I check the size of each backup, they are all the same size. So when I have 4 Backups with a size of 5 GB each, are there 20 GB or just 5 GB due to hard links?

Kendek (nemh) said : #5

Hard links (which are simple files) are pointing to the same data. So the data basically shared between the links.
You can measure the size of the restore points, but it counts the same file multiple times.

Ken Krippeler (lichtverbunden) said : #6

It is still comlicated to me, but thank you a lot.