Done:
38 12 * * * root /home/osmc/osmc-backup >> /home/osmc/backlog 2>&1
Well I assume you interrupted the script by pressing Ctrl-c
I have’nt
Done:
38 12 * * * root /home/osmc/osmc-backup >> /home/osmc/backlog 2>&1
Well I assume you interrupted the script by pressing Ctrl-c
I have’nt
Then check again if crontab ran via journalctl and check if you have backlog file.
Then not sure why rsync ended
Well there’s a ^C in there. Dunno where it came from.
I might have made a goof.
This is what I got now:
backlog file:
/bin/sh: 1: root: not found
rsync logfile:
rsync -axHAXiic --exclude=.gvfs --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/run/* --exclude=/tmp/* --exclude=/lost+found --exclude=/mnt/* --$
2020/04/20 12:07:35 [32176] building file list
2020/04/20 12:07:53 [32176] rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(644) [sender=3.1.2]
Can you share URL of paste-log /home/osmc/osmc-backup
I’ll be back in 30 minutes
Ok, forget this. The problem is a different one.
Do I assume you created the crontab with crontab -e
? That creates a crontab for user osmc.
The crontab line provided in the first post is meant for the system crontab.
sudo nano /etc/crontab
and add the line to the end.
Also remove it from user crontab.
I don’t have anything in /etc/crontab. I must’ve used sudo crontab -e
to set mine up.
But than you would not write root
in there!
Can we move this to another thread to avoid cluttering the how to with a user specific issue?
Indeed. I didn’t follow my own instructions. Edited the OP.
Back!
Removed from user crontab.
Edited in /etc.
Added the line for being run @ 14:15.
And… fully working!
Mon Apr 20 14:15:01 CEST 2020 Backup version 0.1.12a
Going to back up to /mnt/Backups/2020-04-20 (unless I can’t find it).
looking for mounted media
media found at /mnt/Backups, accessed as autofs
1992937952 KiB available on drive
Counting and deleting backups older than 2019-04-21 or if more than 7 of them
Latest backup from 2020-04-19 kept
Now 1992937952 KiB available on drive
Going to stop mediacenter
Going to stop tvheadend
system is on /dev/vero-nand/root - copying from /
system has already been backed up today and will be overwritten
OK, deleting earlier backup
/mnt/Backups/2020-04-20/system deleted
Now 1992979704 KiB available on drive
Backing up system partition to /mnt/Backups/2020-04-20/system
Counting files …
65745 files and directories to process
There are 1 previous backups
Found latest backup at /mnt/Backups/2020-04-19/system
Incremental backup: copying new and changed files to /mnt/Backups/2020-04-20/system
a big thanks to you.
Wonderfull
Oops!
Went back to TV and found a grey screen.
Had to reboot by turning my Vero4K off.
The script stops kodi while the backup is being done, so you won’t see anything on screen while it’s working.
Did the back-up complete? If not you’d better do it again and wait for it to complete.
Okey dokey.
Will give another try later.
It looks like you are backing up over a network. It can take a loooong time so best done at night. By loooong I mean maybe an hour depending on how full your device is.
You will see the time it took in the logs.
… and forgot to give my thanks to you too, Graham.
Kudos for your script!
Has worked like a charm tonight.
Again thank you all.
Hi there,
My first post on OSMC forum!
I tried to run the osmc-backup script on my fresh Vero 4K+ after successfully installed rsynch and pv.
I encountered the similar error at the top of this thread but on a local attached NTFS USB disk.
osmc@osmc:~$ sudo ./osmc-backup /media/STORAGE/saving/osmc
Thu Oct 22 00:05:40 CEST 2020 Backup version 0.1.12a
Going to back up to /media/STORAGE/saving/osmc/2020-10-22 (unless I can't find it).
looking for mounted media
media for /media/STORAGE/saving/osmc not mounted in /media or /mnt
I don’t understand the error as the /media/STORAGE is mounted and the /saving/osmc subdirectory can be listed
osmc@osmc:~$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 757M 0 757M 0% /dev
tmpfs tmpfs 879M 25M 854M 3% /run
/dev/vero-nand/root ext4 14G 11G 2.8G 79% /
tmpfs tmpfs 879M 8.0K 879M 1% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 879M 0 879M 0% /sys/fs/cgroup
/dev/sda1 fuseblk 58G 29G 30G 50% /media/DL
tmpfs tmpfs 176M 0 176M 0% /run/user/1000
/dev/sdb2 fuseblk 3.7T 3.0T 673G 82% /media/STORAGE
osmc@osmc:~$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
`-sda1 exfat DL E091-F118 /media/DL
sdb
|-sdb1
`-sdb2 ntfs STORAGE 46826CE9826CDF45 /media/STORAGE
mmcblk0
mmcblk0boot0
mmcblk0boot1
mmcblk0rpmb
Could it be related to the fact the USB disk is formated into NTFS ?
Thanks in advance for the help
Yes, you can’t back up to NTFS, but that’s not the only problem. You can’t back up to a folder 2 levels below the mount point. Use /media/STORAGE/saving-osmc/ for example. It’s something I’ve been meaning to fix.