Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backing up OS with Rsync
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wilsonsamm
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 196

PostPosted: Tue Mar 17, 2015 2:00 pm    Post subject: Backing up OS with Rsync Reply with quote

I often use Rsync to back my home partition up on an NFS share or removable media. I thought to myself, why not use it to copy my gentoo from my main work computer to my laptop! It will probably run a bit smoother on my laptop than Linux Mint, with a little configuration. So I wrote a simple script:

Code:
#!/bin/bash

rsync -avx --delete / \
   --exclude=/usr/portage/ \
   --exclude=/usr/include/ \
   --exclude=/usr/src/ \
   --exclude=/var/log/ \
   /mnt/share/gentoo


/mnt/share/ is network storage. As you can see, I have a directory there, and I intend to copy my entire operating system there, (excluding a few directories not necessary for day-to-day operation).

Then I can simply boot my laptop into linux mint, and then use rsync to copy gentoo onto the laptop.
Code:
#!/bin/bash
rsync -avx /mnt/share/gentoo /mnt/gentoo
update-grub2

(remember, because this might copy a new kernel over, we also need to run update-grub2 to get grub to have a look.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum