Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

External harddrive overwritten as xbian-copy
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
External harddrive overwritten as xbian-copy
13th Nov, 2018, 07:15 AM
Post: #1
nickfx Offline
Registered
Posts: 14
Joined: Feb 2016
Reputation: 0
External harddrive overwritten as xbian-copy
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?
Find all posts by this user
Quote this message in a reply
16th Nov, 2018, 11:00 PM (This post was last modified: 16th Nov, 2018 11:01 PM by Nachteule.)
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
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
Find all posts by this user
Quote this message in a reply
17th Nov, 2018, 07:21 AM
Post: #3
nickfx Offline
Registered
Posts: 14
Joined: Feb 2016
Reputation: 0
RE: External harddrive overwritten as xbian-copy
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.
Find all posts by this user
Quote this message in a reply
17th Nov, 2018, 07:24 AM
Post: #4
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
(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
Find all posts by this user
Quote this message in a reply
17th Nov, 2018, 07:39 AM
Post: #5
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
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
Find all posts by this user
Quote this message in a reply
18th Nov, 2018, 11:37 PM
Post: #6
nickfx Offline
Registered
Posts: 14
Joined: Feb 2016
Reputation: 0
RE: External harddrive overwritten as xbian-copy
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
Find all posts by this user
Quote this message in a reply
18th Nov, 2018, 11:52 PM
Post: #7
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
(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.
Find all posts by this user
Quote this message in a reply
18th Nov, 2018, 11:55 PM
Post: #8
nickfx Offline
Registered
Posts: 14
Joined: Feb 2016
Reputation: 0
RE: External harddrive overwritten as xbian-copy
Yes, IMGPLAN=monthly, now set to none...

Do I also need to change HOMEPLAN?
Find all posts by this user
Quote this message in a reply
18th Nov, 2018, 11:59 PM (This post was last modified: 19th Nov, 2018 12:00 AM by Nachteule.)
Post: #9
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
(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 Smile
Find all posts by this user
Quote this message in a reply
19th Nov, 2018, 12:08 AM
Post: #10
nickfx Offline
Registered
Posts: 14
Joined: Feb 2016
Reputation: 0
RE: External harddrive overwritten as xbian-copy
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.
Find all posts by this user
Quote this message in a reply
19th Nov, 2018, 12:25 AM (This post was last modified: 19th Nov, 2018 12:25 AM by Nachteule.)
Post: #11
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: External harddrive overwritten as xbian-copy
(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
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  xbian-copy screen effemmeffe 4 12,531 5th Feb, 2015 08:50 PM
Last Post: effemmeffe

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 11th May, 2025, 11:18 PM Powered By MyBB, © 2002-2025 MyBB Group.