Re: users backup (will change the root hard disk)
On 2009-03-23_16:51:19, Pol Hallen wrote:
> Hi folks :-)
>
> I need change my root hard disk and I'd like save all system users (many
> because each has a mailbox).
>
> Is there a tool (or which program) can I use for do this?
>
> thanks :-)
>
> Pol
I'm guessing that you want something you can do -now-, as opposed to a thoroughly
designed backup system. For -now-:
Buy an external USB hard drive, the kind that has moving parts inside. You can
get a terabyte for under $200 at Costco. If your root disk is bigger that that
spend more money, you have enough money to buy a bigger USB hard drive. Get one
that's big enough to hold it all.
Use rsync. Run as root user.
Mount the USB drive at /media/USB
Look at /etc/mtab to discover what device name was assigned to the USB
Unmount the USB but don't disconnect it.
Write an ext3 file system onto the USB so that you don't have to deal
with the naming and file size limitations of vfat.
Remount the USB
Create a top level target directory on the USB
#> mkdir /media/USB/target
Do something like
#> rsync -a /home/ /media/USB/target
Notice that 'home' has slashes both left and right. This is important
to rsync.
Follow with rsync of other directories in /. E.g. /etc, /boot, /root,
etc.
Do NOT do #> rsync -a /media/ /media/USB/target ;-(
Think about the order in which you do the directories so that you get
the most important stuff first, in case the root drive fails while you
are working.
Don't worry about getting backup of the software that you got from
Debian. Newer, better versions are available from debian.org once you
have a new HD installed. If you have time, you might do
#> dpkg --get-selections >/media/USB/target/myselections
HTH
--
Paul E Condon
pecondon@mesanetworks.net
Reply to: