Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been trying to backup my Ubuntu machine which is a Wubi installed Ubuntu alongside Vista.

So far I have done the following First I navigated to my external hard-drive then I created a backup folder on this drive and then I entered the following from the terminal:

sudo tar cpf mybackup.tgz2

    --exclude="/host/*" 
    --exclude="/media/*" 
    --exclude="/mnt/*" 
    --exclude="/proc/*" 
    --exclude="/tmp/*" 
    --exclude="/sys/*"
    --exclude="/home/*/gvfs/*" /   (I have also tried, "/home/.../.gvfs")

and the process runs through but eventually gives me this message: Exiting with failure status due to previous error.

I have seen on this forum, that permission denied, could be a reason for a failure status, also, I visited this site: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/225361, where there is some discussion about .gvfs as having a bug of some sort or another... the discussion is beyond me but it seems this could be the reason that I have a failure notice, (if you go to the end of the discussion on this bug site you will see that Ubuntu 11.10 still has some problem with this issue).

So my question is, does anyone know how I can get around this issue and get a clean reliable backup? I mean a backup with a failure status is not one that inspires me with confidence.

Thanks for any help,

railguide48

share|improve this question
    
Are you looking for a full backup from the machine or just some folders? Seems you are excluding a lot from system files but not all so I really dont know what kind of backup you are looking for. –  Bruno Pereira Nov 11 '11 at 20:03
    
Hi brunopereira81 ... yes I am looking for a full backup of the Ubunutu files .... remember my host is Vista. Thanks for your reply and interest. –  railguage48 Nov 11 '11 at 20:38
    
Are you looking for a complete backup of your wubi install? Or are you just trying to backup your files so you can restore them later to another system, if you tell your purpose you get better answers ;) –  Bruno Pereira Nov 11 '11 at 20:45
    
Hi brunopereira81 ... my apologies for not being clearer .... I have spent considerable time setting up my ubuntu environment for ruby on rails and so I thought I would back it up .... that is the purpose of the backup ... i am not sure if that means I have to also backup the Ubuntu files but essentially I would like to have a backup that should things fail on my laptop through some error in rails on my part since I am still learning it that I can just re-install the ruby on rails environment that I have setup. .... thanks. –  railguage48 Nov 11 '11 at 21:04
    
Then use my solution, just backup your ubuntu root.disk file before messing up the system. If you mess it up you will just need to restore the root.disk file back to the folder and your system will be back to the restore point. –  Bruno Pereira Nov 11 '11 at 21:09

2 Answers 2

up vote 0 down vote accepted

To preform a complete wubi system backup copy your root.disk file from your ubuntu folder within windows to another location, if something bad happens you just need to replace the current file with the one you backed up and your system will be back to what it was at the time of the backup.

You can even mount the root.disk file within Ubuntu if you want to partially restore some files only:

sudo mkdir /mnt/rootdisk
sudo mount -o loop <path to share in windows>/root.disk /mnt/rootdisk

Will mount your root.disk to a the path /mnt/rootdisk.

share|improve this answer
1  
Hey brunopereira81 ... that sounds great ... I will make a note of this option ... thanks again for your help. –  railguage48 Nov 11 '11 at 21:22

You don't need to back up .gvfs for your backup to be successful. This folder stores information about currently mounted userspace filesystems. If you restore a user's home directory without the .gvfs folder, it will be re-created and repopulated as needed. In fact, the proposed solution in bug 225361 was to put users' .gvfs folders somewhere besides in their home directories (like in /tmp), so they would automatically be skipped over by any operation targeting just the contents of users' home directories.

You said that you tried to exclude /home/*/gvfs/* and /home/.../.gvfs. The former would exclude folders called gvfs (instead of .gvfs) in users' home directories. And the latter, assuming you mean it literally, would exclude folders called .gvfs in the directory called ... in /home (which almost certainly doesn't exist since there cannot be a user with username ..., but even if it did, wouldn't solve the problem).

What you want to do is to exclude .gvfs (with the leading .) in each user's home directory. That is represented by: /home/*/.gvfs

share|improve this answer
    
Thanks Eliah Kagan .... I am trying to backup this time with --exclude="/home/*/.gvfs". Does it matter if there is just my home directory and I use the exclude as above...I will try again with just home/.gvfs if I still get the failure and eventually move the .gvfs file to a tmp directory as you suggested. Thanks –  railguage48 Nov 11 '11 at 20:45
    
@railguage48 I do not recommend that you move .gvfs inside /tmp (or to any temporary directory). Just because you can restore successfully from a backup that is missing ~./gvfs dos not mean that removing the directory while you are logged in (i.e., while it is in use) is a safe thing to do. Furthermore, you might very well find that you cannot remove it while logged in (but even if you can, you still shouldn't). Moving .gvfs to inside /tmp was a proposed programmatic fix to bug 225361, sorry if I was unclear. –  Eliah Kagan Nov 11 '11 at 23:12
    
@railguage48 For further clarification: I had mentioned the suggested programmatic fix of moving the data inside .gvfs to somewhere inside /tmp to illustrate that you can successfully start a login session for a user who has no .gvfs data from the previous session (as this is the behavior of /tmp--files and folders in it are not guaranteed to be persistent). Thus, a backup without the user's .gvfs folder should restore to a fully usable state. I was not suggesting that you move .gvfs yourself--if you did, Ubuntu would not know where to find its contents! –  Eliah Kagan Nov 11 '11 at 23:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.