[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting to runlevel 1



Shachar Or wrote:
On Friday 29 August 2008 02:15, Shachar Or wrote:
Hi.

In order to rsync my root, I switch to single user mode. While I'm quite
positive that it is good that I quit my desktop session before the rsync,
I'm not sure what good it does to switch to single user mode.

I switch to single user mode by 'shutdown -r now' and selecting it in grub.
Is there a quicker way? 'init 1' seems to get me in a state where there are
a few daemons running that wouldn't be otherwise.

Forgot to mention I'm not subscribed :)


The reason for going to single user mode for doing a backup is to prevent changes happening while the backup is running.

As a worst case scenario, assume the backup is processing a rather large file, say a few hundred MB at least. This allows time for some user or application to access the file and make changes while it is being processed for backup. Further, assume the application uses some sort of index header to record positional information, but the information is added at the end of the file.

The backup will have processed the old header, but will add the new data on the end. The result is a potentially corrupted file in the backup that you would not realize is corrupted until you try to actually use it.

Now, I don't know, myself, of any application that works in exactly this manner, but some backup programs operate on the raw device file, and activity on the contained filesystem could well create a similar situation with inodes and free/used block lists.

That said, if you are the only user on your machine, it may be safe to do at least some backups in full multi-user mode. For example, if you log out as yourself, login as root or some other user, and backup your home directory, then nothing should be running that would make changes to your files. So this would be pretty safe.

Generally, run backups from single user mode (or runlevel 1). It's much safer.

--
Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: