Permission denied problem restoring files after reinstalling Ubuntu

Asked by Phil Dunkerley

Have only just started using BIT, and am having problems restoring files from backup after having reinstalled Ubuntu.

Previously, my hard drive was partitioned quite differently to how it is now after the reinstall. For historic reasons, the data I was backing up was in a folder called /home/home/data.

After reinstalling Ubuntu, I would like to now keep all my data in a folder called /data/stuff, so basically I want everything that used to be in /home/home/data to now appear in /data/stuff.

I could just copy everything across, but all the files are stored readonly in the backup, and I want BIT to restore the original permissions, which I figure it can. Is there some way to do this?

I tried creating a /home/home/data folder so that it would restore the files there, but in the terminal it logs:

INFO: Restore: /home/home/data/VirtualBox
sending incremental file list
rsync: rename home to backup home.backup.20091030: Permission denied (13)
rsync: delete_file: make_backup(home) failed: Permission denied (13)
could not make way for new directory: home
rsync: rename home to backup home.backup.20091030: Permission denied (13)
rsync: delete_file: make_backup(home) failed: Permission denied (13)
could not make way for new directory: home
*** Skipping any contents from this failed directory ***

sent 1413 bytes received 28 bytes 2882.00 bytes/sec
total size is 14395937125 speedup is 9990240.89
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1058) [sender=3.0.5]
WARNING: Command "rsync -avRAXE --whole-file --backup --suffix=.backup.20091030 --chmod=+w "/media/truecrypt1/backups/backintime/20091029-202537/backup/./home/home/data/VirtualBox" /" returns 5888

Is it trying to rename my /home folder?! I obviously don't want it to do that, I just want it to restore the files there.

I don't know if this is relevant, but my /home folder is a symlink (Ubuntu is on sda1, /data is sda5, /home points to /data/homejaunty).

Thanks, Phil.

Question information

Language:
English Edit question
Status:
Answered
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bart de Koning (bratdaking) said :
#1

Did you press restore while selecting the home folder? because then it will
try to restore the whole home folder, causing an error when it is not a
root. Select the data folder and then push restore. What is the outcome
then?

2009/10/31 Phil Dunkerley <email address hidden>

> New question #87582 on Back In Time:
> https://answers.launchpad.net/backintime/+question/87582
>
> Have only just started using BIT, and am having problems restoring files
> from backup after having reinstalled Ubuntu.
>
> Previously, my hard drive was partitioned quite differently to how it is
> now after the reinstall. For historic reasons, the data I was backing up was
> in a folder called /home/home/data.
>
> After reinstalling Ubuntu, I would like to now keep all my data in a folder
> called /data/stuff, so basically I want everything that used to be in
> /home/home/data to now appear in /data/stuff.
>
> I could just copy everything across, but all the files are stored readonly
> in the backup, and I want BIT to restore the original permissions, which I
> figure it can. Is there some way to do this?
>
> I tried creating a /home/home/data folder so that it would restore the
> files there, but in the terminal it logs:
>
> INFO: Restore: /home/home/data/VirtualBox
> sending incremental file list
> rsync: rename home to backup home.backup.20091030: Permission denied (13)
> rsync: delete_file: make_backup(home) failed: Permission denied (13)
> could not make way for new directory: home
> rsync: rename home to backup home.backup.20091030: Permission denied (13)
> rsync: delete_file: make_backup(home) failed: Permission denied (13)
> could not make way for new directory: home
> *** Skipping any contents from this failed directory ***
>
> sent 1413 bytes received 28 bytes 2882.00 bytes/sec
> total size is 14395937125 speedup is 9990240.89
> rsync error: some files/attrs were not transferred (see previous errors)
> (code 23) at main.c(1058) [sender=3.0.5]
> WARNING: Command "rsync -avRAXE --whole-file --backup
> --suffix=.backup.20091030 --chmod=+w
> "/media/truecrypt1/backups/backintime/20091029-202537/backup/./home/home/data/VirtualBox"
> /" returns 5888
>
> Is it trying to rename my /home folder?! I obviously don't want it to do
> that, I just want it to restore the files there.
>
> I don't know if this is relevant, but my /home folder is a symlink (Ubuntu
> is on sda1, /data is sda5, /home points to /data/homejaunty).
>
> Thanks, Phil.
>
>
> --
> You received this question notification because you are an answer
> contact for Back In Time.
>

Revision history for this message
Phil Dunkerley (phil-thedunkerleys) said :
#2

I right clicked on the folder I wanted to restore and selected Restore from the context menu.

Have done some further investigation - am now certain it is to do with my /home directory being a symlink. Temporarily undid the symlink (e.g. went back to /home being a regular directory), and tried again, and this time it worked.

Whilst that works, it's not ideal for me, as my root partition is too small to contain all my data :-(

I take it that the rsync command that gets logged in terminal is what BiT wraps; do you know of any parameters I could use to make this work with the symlink? Have only just discovered rsync (and now find it everywhere!) and it looks pretty hairy!

Thanks for replying, and also for BiT - looks very useful. If only I could get my files back out of it :-)

Phil

Revision history for this message
Bart de Koning (bratdaking) said :
#3

Oh sorry, I misunderstood your problem. BiT does not follow symlinks,
therefore everything under the symlink is not backupped. We did this on
purpose, because following symlinks almost always leads to double backups,
and restoring becomes a nightmare (as it will restore everything on the
original spot, which is in your case too small).

However there is a very easy solution -> select the folder that it linked to
in the included folders (so include your /data folder), then you will backup
this data too and you can restore things to the original spot in case of a
failure, and as the symlinks themselves are backupped too it will restore
everything in the same manner.

Rsync is indeed the engine of BiT, actually BiT is a graphical wrap around
rsync (and cp -al for the hardlinks). You can read the manual by "man
rsync":
        -l, --links copy symlinks as symlinks
        -L, --copy-links transform symlink into referent file/dir
            --copy-unsafe-links only "unsafe" symlinks are transformed
            --safe-links ignore symlinks that point outside the
tree
        -k, --copy-dirlinks transform symlink to dir into referent
dir
        -K, --keep-dirlinks treat symlinked dir on receiver as dir
(We use -l, what you mean might -L do, however it will transform the symlink
into a normal dir, meaning that when you restore, it will try to put
everything into your /home, instead of a part in /home and a part in /data)

Cheers,
Bart

2009/11/2 Phil Dunkerley <email address hidden>

> Question #87582 on Back In Time changed:
> https://answers.launchpad.net/backintime/+question/87582
>
> Status: Answered => Open
>
> Phil Dunkerley is still having a problem:
> I right clicked on the folder I wanted to restore and selected Restore
> from the context menu.
>
> Have done some further investigation - am now certain it is to do with
> my /home directory being a symlink. Temporarily undid the symlink (e.g.
> went back to /home being a regular directory), and tried again, and this
> time it worked.
>
> Whilst that works, it's not ideal for me, as my root partition is too
> small to contain all my data :-(
>
> I take it that the rsync command that gets logged in terminal is what
> BiT wraps; do you know of any parameters I could use to make this work
> with the symlink? Have only just discovered rsync (and now find it
> everywhere!) and it looks pretty hairy!
>
> Thanks for replying, and also for BiT - looks very useful. If only I
> could get my files back out of it :-)
>
> Phil
>
> --
> You received this question notification because you are an answer
> contact for Back In Time.
>

Can you help with this problem?

Provide an answer of your own, or ask Phil Dunkerley for more information if necessary.

To post a message you must log in.