skimppimppin along! NEWS   FORUM   DOWNLOAD   LINKS    
HOME ACCOUNT PRIVATE MESSAGE  
Login
Username:

Password:


Lost Password?

Register now!

Main Menu

Search

skimpydog.com Forum Index
   Gentoo Base
  BackUp and Restore - a few notes and tidbits

Browsing this Thread:   1 Anonymous Users

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread Rated:  2 Votes
BackUp and Restore - a few notes and tidbits
#1
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
BackUp & Restore:
BackUp:
tar cvpjf BackUp.tar.bz2 --exclude=/BackUp.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys /

Split the files into 2gb chunks:
split -d -b 2G BackUp.tar.bz2 BackUp.tar.bz2.

Put the split files back together:
cat BackUp.tar.bz2.01 BackUp.tar.bz2 > BackUp.tar.bz2

or
cat BackUp.tar.bz2.* > BackUp.tar.bz2

Restore:
tar xvpfj backup.tar.bz2 -C /
mkdir /proc
mkdir /mnt
mkdir /sys

Grub:
grub
find /boot/grub/stage1
root (hdX,X)
setup (hd0)
quit

If you are on a live CD:
-- this is example only
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo
env-update
source /etc/profile

/etc/fstab
Be sure to edit the /etc/fstab to fit your needs.
/dev/hda1               /boot           ext3            noatime         1 2
/dev/hda3               /               ext3            noatime         0 1
/dev/hda2               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            exec,ro,user,noauto             0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0
#/dev/hda7              /mnt/BackUp     ntfs            auto,uid=1000,gid=1000  1 2

Hostname:
hostname HostName-YouWant
vi /etc/conf.d/hostname

-- save, and exit

Networking:
vi /etc/conf.d/net.eth{1,2,3...}
cd /etc/init.d/ ; ln -s net.lo net.{1,2,3}
Posted on: 2009/10/25 0:00
Create PDF from Post Print
Top
Re: BackUp and Restore - a few notes and tidbits
#2
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
A lil note about rsync while specifying the desired port, working with locations - showing how to copy from one computer to another (and neither computer is the one you are directly accessing [at the end]):: like this:

rsync -azv --progress --rsh='ssh -p2222' username@hostname:/remote/Directory/to/copy/file .
This will copy "file" to "."

-- For those of you who don't know, the element "." is your current working directory, and ".." is the directory which contains the directory you are in (the directory above you).


You could also do:
mkdir copy ; rsync -azv --progress --rsh='ssh -p2222' username@hostname:/remote/Directory/to/copy copy

This will create the directory "copy", and place the "copy" directory into the "copy" directory.
-- like:
/copy/copy

If you do this, which is acceptable, it may give you results you may not desire, therefore using the "." can useful to location specification.



Here's another:
rsync -azv --progress --rsh='ssh -p2222' copy/file username@hostname:/remote/Directory/to/copy/file


This will copy the local "file" to the remote server & directory via ssh/rsync.

Lastly, copying from one box to another, which neither one of you are directly connected to:
rsync -azv --progress --rsh='ssh -p2222' username@hostname:/remote/Directory/to/copy/file username2@hostname2:/remote/Directory/to/copy/file
-- apparently you can always change the locations at either end
Posted on: 2010/3/20 19:52
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.
Links