Jump to content

Mirroring Partitions w/ rsync (grsync)


V.T. Eric Layton

Recommended Posts

V.T. Eric Layton

Mirroring My Slackware Partitions

 

- Using Porteus (thumb drive) Linux

> grsync as root (can also be done with rsync as root from terminal)

 

- Porteus automatically mounts all available partitions. However, best to check

> gparted to check mounting or

> cd mnt to check

 

Note: both source and destination must be mounted for rsync to work.

 

- Open Terminal

> su to root

> start grsync

 

- Set up session in grsync

> check preserve user, permissions, time, groups, etc

> check copy symlinks and hardlinks

> uncheck verbose

 

> choose source - add trailing / to prevent source directory creation on destination

> choose destination

 

> test run, if wanted

> start live run

 

- Repeat above for each partition to be mirrored

 

- After mirroring completed, to make the mirror bootable as the original, fstab must be edited to correct for source/destination partition number discrepancies

 

- Also edit GRUB to boot mirrored partition

 

=====

 

For rsync, just make sure the source and destination are both mounted, then execute (as root):

 

#rsync -a /dev/sd/ /dev/sd

 

*Don't forget trailing / after source.

 

____________________________________________________________________________

 

rsync is VERY COOL! I should have been using this years ago to backup. It took about 45 minutes to mirror my 25Gig / and my 50Gig /home partitions. I can do this every Sunday. I'll never lose more than 7 days' worth of work this way. Unless, of course, my drive crashes, since both the original and source are on the same drive. I have two other drives on this system, though. Time permitting, I may set up one with the proper sized partitions to create a true backup. The current method is only to provide me with a usable Slackware if I should booger up my primary one somehow.

 

So, there we go...

Link to comment
Share on other sites

securitybreach

Nice tutorial!!

 

Rsync is a very useful tool and I have been using it for a long time as a cronjob to backup certain folders to my backup harddrive:

00 15 * * * rsync -ar --delete /home/comhack/Videos /home/comhack/Music /home/comhack/Android /home/comhack/Documents /home/comhack/Downloads /home/comhack/Pictures /home/comhack/Shared /MEDIA &> /dev/null

From here: https://wiki.archlinux.org/index.php/Rsync#Automated_backup

Link to comment
Share on other sites

V.T. Eric Layton

Mmm... cron job wouldn't work for me. I don't keep my systems up and running all the time. I can do it manually, though. No biggie.

 

I was actually AMAZED when the mirror Slackware booted without a hitch! ;)

  • Like 1
Link to comment
Share on other sites

securitybreach

So can I rsync to a big enough thumb drive and then just boot off the thumb drive?

 

Possibly, it would not hurt to try it.... B)

Link to comment
Share on other sites

V.T. Eric Layton

So can I rsync to a big enough thumb drive and then just boot off the thumb drive?

 

You'd have to make sure that you amended your fstab to understand where to mount / and /home, etc. Thumb drives are so huge these days, you could probably boot just about any full-featured Linux with one. Heck! I carry a 2Gig thumb w/ SLAX (KDE) around with me all the time... handy little booger! :)

 

You'd have to set up a bootloader (LILO or GRUB) on the thumb, though. I wonder if this would work. You'd probably need about a 30Gig thumb so you could have a /(root), /home, and a /swap partition on it.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...