I thought my external hard disk, containing all my movies, music and photos had failed, but instead it had been formatted as xbian-copy. I have no idea what I have done to do that, but would really like some advice on what might have happened. I used to have 2 external disks on the machine, and had used one as backup device, but removed it as I needed it elsewhere. Now it overwrote my other drive... Any idea what happened?
A misconfigured xbian-config copier command could be the culprit.
If the destination is the partition of your external harddisk, the partition would be reformatted and all existing data is lost
And of course, you can do that mistake in Kodi's xbian-config (category Backup) as well
I might have set that in Kodi. In xbian-config > Xbian copier, the destination is set to /dev/dsX, presumably that means any attached hard drive.
(17th Nov, 2018 07:21 AM)nickfx Wrote: [ -> ]I might have set that in Kodi. In xbian-config > Xbian copier, the destination is set to /dev/dsX, presumably that means any attached hard drive.
No, /dev/sdX is just acts as an placeholder, device /dev/sdX never exists
You can grep the file
/etc/default/xbian-snap, maybe there is a /dev/sdX device configured
Terminal
grep -v "^#" /etc/default/xbian-snap | grep /dev/sd
Quote:You can grep the file /etc/default/xbian-snap, maybe there is a /dev/sdX device configured
Yup, there it is...
Code:
# path to img including file name (/media/my_disk/xbian_backup.img) or block device (/dev/sda1)
IMGDEST="/dev/sda1"
# how many images should be kept (0 means unlimited)
IMGKEEP=0
# auto backup of /home should be run: none/daily/weekly/monthly
HOMEPLAN=monthly
# path to img.gz including file name (/media/my_disk/xbian_home_backup.img.gz)
HOMEDEST="notset"
# how many /home images should be kept (0 means unlimited)
HOMEKEEP=0
I wonder whether it would be safer in general to define the backup location by UUID rather than device. Otherwise this can occur whenever someone changes their hard disk configuration... I did not remember at all that I had set up a backup way back when.
nick
(18th Nov, 2018 11:37 PM)nickfx Wrote: [ -> ]Quote:You can grep the file /etc/default/xbian-snap, maybe there is a /dev/sdX device configured
Yup, there it is...
Code:
# path to img including file name (/media/my_disk/xbian_backup.img) or block device (/dev/sda1)
IMGDEST="/dev/sda1"
# how many images should be kept (0 means unlimited)
IMGKEEP=0
# auto backup of /home should be run: none/daily/weekly/monthly
HOMEPLAN=monthly
# path to img.gz including file name (/media/my_disk/xbian_home_backup.img.gz)
HOMEDEST="notset"
# how many /home images should be kept (0 means unlimited)
HOMEKEEP=0
I wonder whether it would be safer in general to define the backup location by UUID rather than device. Otherwise this can occur whenever someone changes their hard disk configuration... I did not remember at all that I had set up a backup way back when.
nick
Yes, would make more sense. But you are free to configure that variable to any value you want. I'll check later if a UUID is supported at this place
What about IMGPLAN variable. Is it set to monthly as well. If it is so, we have the explanation for your disk has been overwritten.
Yes, IMGPLAN=monthly, now set to none...
Do I also need to change HOMEPLAN?
(18th Nov, 2018 11:55 PM)nickfx Wrote: [ -> ]Yes, IMGPLAN=monthly, now set to none...
Do I also need to change HOMEPLAN?
Your HOMEDEST variable is set to "notset", which absolutely makes no sense. So, if you do not want to make sceduled automatic backups, set to none for HOMEPLAN would be good idea
Great, thanks a lot. HOMEDEST="notset" was not my doing, must have been the default. All safe now... I'll wait to hear if UUID can be used, then I might re-enable it with the 2nd hard drive. Cheers.
(19th Nov, 2018 12:08 AM)nickfx Wrote: [ -> ]Great, thanks a lot. HOMEDEST="notset" was not my doing, must have been the default. All safe now... I'll wait to hear if UUID can be used, then I might re-enable it with the 2nd hard drive. Cheers.
I suppose this is not the backup strategy you want to have.
If you write to an partition, the root partition will be copied only, but not the /boot partition.
If you want to make monthly backups, you'll have to configure an image backup, with destination on your external disk (usually the disks are mouted to /media/<lLabelOfTheDisk>, so this folder does never change)
So, those variable should look like
Code:
# auto clone / image creation should be run: none/daily/weekly/monthly
IMGPLAN=monthly
# backup to img file (file) (in case of total SD card corruption, your system can be restored by reflashing this image)
# or directly to block device (block)
IMGTYPE=file
# path to img including file name (/media/my_disk/xbian_backup.img) or block device (/dev/sda1)
IMGDEST=/media/<yourbackupdisk>/xbian_image_$(date +%F).img
# how many images should be kept (0 means unlimited)
IMGKEEP=3