root backup?

Asked by Dario Bertini

using BiT 0.9.26

from the documentation: "Back In Time acts as a “user mode” backup system. This means that you can backup/restore only folders you have write access to (actually you can backup read-only folders, but you can’t restore them)."

so, this mean i should be able to backup "/" even if BiT was launched as normal user... (while having to use it as root to eventually restore some of the contents), but i'm unable to do it:

i added / to the included folders, but it created a completely empty snapshot

$ls -A 20091012-020001/backup/
$

so, not only it didn't backup /, but even my home wasn't backup... (then i added my home manually, and it worked just fine, so kudos for your work :) )

is there a way to backup / without launching BiT as root?

thank you

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

I don't think so. Besides that I think it would raise serious security risks
if it could actually, it would also create an incomplete backup, as it would
skip all the non-readable files.
Probably the reason that you get an empty root is that it cannot make a
folder with root ownership in user mode. Thinking about it you could try an
NTFS partition, it might work over there (as it cannot store the ownerships
over there).

If you want to have a full backup the best thing is actually launch it as
root.

Cheers,
Bart

2009/10/12 Dario Bertini <email address hidden>

> New question #85576 on Back In Time:
> https://answers.launchpad.net/backintime/+question/85576
>
> using BiT 0.9.26
>
> from the documentation: "Back In Time acts as a “user mode” backup system.
> This means that you can backup/restore only folders you have write access to
> (actually you can backup read-only folders, but you can’t restore them)."
>
> so, this mean i should be able to backup "/" even if BiT was launched as
> normal user... (while having to use it as root to eventually restore some of
> the contents), but i'm unable to do it:
>
> i added / to the included folders, but it created a completely empty
> snapshot
>
> $ls -A 20091012-020001/backup/
> $
>
> so, not only it didn't backup /, but even my home wasn't backup... (then i
> added my home manually, and it worked just fine, so kudos for your work :) )
>
>
> is there a way to backup / without launching BiT as root?
>
>
> thank you
>
> --
> You received this question notification because you are an answer
> contact for Back In Time.
>

Revision history for this message
Dario Bertini (berdario) said :
#2

>I don't think so. Besides that I think it would raise serious security risks
>if it could actually, it would also create an incomplete backup, as it would
>skip all the non-readable files.

doing a quick "ls -R /" seems that, apart from /proc /root and /tmp (which should be fine to ignore) it skips only some things inside /var (/var/lib /var/log /var/run and /var/spool), so the vast majority of config files should be copied just fine

>Probably the reason that you get an empty root is that it cannot make a
>folder with root ownership in user mode.

now that you mention it... by selecting /home/user ... it creates a home folder (under the backup folder) with my user as a owner, when in the "real" file system it's obviously owned by root...

i wonder if this could create some problem if hypothetically the entire /home was to be restored...

if not BiT could do the same thing when requested to backup a folder whose owner isn't the user, to at least dig into the fs to reach the user's folders and then actually backup only those...

>If you want to have a full backup the best thing is actually launch it as
>root.

That's less than ideal, since BiT doesn't share the root configuration with the user one... otoh having a cron job with superuser permission to do backups maybe isn't that unusual, so i guess i should get along with the idea...

however thank you for your prompt response

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

>if not BiT could do the same thing when requested to backup a folder
>whose owner isn't the user, to at least dig into the fs to reach the
>user's folders and then actually backup only those...

Good point actually, could you file that as a bug? It is something you
expect it should do, what now it cannot do.

>That's less than ideal, since BiT doesn't share the root configuration
>with the user one... otoh having a cron job with superuser permission to
>do backups maybe isn't that unusual, so i guess i should get along with
>the idea...

Actually you could point your snapshot folder to the root snapshot folder
and it will list the root snapshost, however I am actually thinking about a
solution that somehow the root configuration is automatically added to the
user configurations. So individual users can restore their files from
snapshots made by root.

>however thank you for your prompt response
You are welcome!

2009/10/13 Dario Bertini <email address hidden>

> Question #85576 on Back In Time changed:
> https://answers.launchpad.net/backintime/+question/85576
>
> Status: Answered => Open
>
> Dario Bertini is still having a problem:
> >I don't think so. Besides that I think it would raise serious security
> risks
> >if it could actually, it would also create an incomplete backup, as it
> would
> >skip all the non-readable files.
>
> doing a quick "ls -R /" seems that, apart from /proc /root and /tmp
> (which should be fine to ignore) it skips only some things inside /var
> (/var/lib /var/log /var/run and /var/spool), so the vast majority of
> config files should be copied just fine
>
> >Probably the reason that you get an empty root is that it cannot make a
> >folder with root ownership in user mode.
>
> now that you mention it... by selecting /home/user ... it creates a home
> folder (under the backup folder) with my user as a owner, when in the
> "real" file system it's obviously owned by root...
>
> i wonder if this could create some problem if hypothetically the entire
> /home was to be restored...
>
> if not BiT could do the same thing when requested to backup a folder
> whose owner isn't the user, to at least dig into the fs to reach the
> user's folders and then actually backup only those...
>
> >If you want to have a full backup the best thing is actually launch it as
> >root.
>
> That's less than ideal, since BiT doesn't share the root configuration
> with the user one... otoh having a cron job with superuser permission to
> do backups maybe isn't that unusual, so i guess i should get along with
> the idea...
>
>
> however thank you for your prompt response
>
> --
> You received this question notification because you are an answer
> contact for Back In Time.
>

Revision history for this message
Peter (pstevens555-gmail) said :
#4

Bart,
This would be an ideal situation. Should it be filed as an "enhancement?"

Bart de Koning said on 2009-10-13
>however I am actually thinking about a solution that somehow
>the root configuration is automatically added to the user configurations.
>So individual users can restore their files from snapshots made by root.

Can you help with this problem?

Provide an answer of your own, or ask Dario Bertini for more information if necessary.

To post a message you must log in.