View previous topic :: View next topic |
Author |
Message |
rado3105 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jul 2007 Posts: 293
|
Posted: Sat Dec 25, 2010 7:25 pm Post subject: Backup of disk on remote server |
|
|
It can be done mounting partition as ro, using this command:
dd if=/dev/sda | ssh root@target "(cat >/root/backup.img)"
where /dev/sda is disk on server, target is ip of pc I am trying to do the download from.
Everything works fine, but when I do the backup using that command it makes the backup image of size of hardisk(32gb), but only 4gb are with data. So is any way to backup just that data(something similar to acronis true image)? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Dec 25, 2010 7:58 pm Post subject: |
|
|
If you only want the data, use rsync. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rado3105 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jul 2007 Posts: 293
|
Posted: Sat Dec 25, 2010 8:15 pm Post subject: |
|
|
So its something like copy tool, copies folder. How to restore than server, is possible to copy back that data on running server?(sometimes when I make some experimentation I want to revert back, and I dont want everytime physically do it). Is that possible? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rado3105 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jul 2007 Posts: 293
|
Posted: Wed Dec 29, 2010 9:15 am Post subject: |
|
|
Nobody can help? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
HensonDuglasSturgill n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Dec 2010 Posts: 4 Location: Canton, NC, USA
|
Posted: Sun Jan 09, 2011 8:16 am Post subject: |
|
|
So, I've never actually done this, but I was thinking something like the following command -- assuming you're booted into the Gentoo install CD and have your root (and /boot mounted):
tar -cvj -C /mnt/gentoo --exclude proc --exclude dev --exclude lost+found > /mnt/external/backup.tar.bz2
You'd still need make directories for /dev and /proc when you try to restore, and probably need to run MAKEDEV. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ppurka Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sun Jan 09, 2011 1:05 pm Post subject: |
|
|
If you are uncomfortable with configuring rsync, then you can use a GUI for rsync like luckybackup. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bobspencer123 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1654067861444cbc0a199f9.jpg)
Joined: 19 Dec 2005 Posts: 544
|
Posted: Sun Jan 09, 2011 6:23 pm Post subject: |
|
|
you could check out stage 4 script created by blinkeye. _________________ Increasingly becoming a 2 channel audio nut! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23103
|
Posted: Sun Jan 09, 2011 8:30 pm Post subject: |
|
|
HensonDuglasSturgill wrote: | So, I've never actually done this, but I was thinking something like the following command -- assuming you're booted into the Gentoo install CD and have your root (and /boot mounted):
tar -cvj -C /mnt/gentoo --exclude proc --exclude dev --exclude lost+found > /mnt/external/backup.tar.bz2
You'd still need make directories for /dev and /proc when you try to restore, and probably need to run MAKEDEV. | Assuming use of the LiveCD, then there is no need to exclude proc and dev. They are mount points for virtual filesystems, so the on-disk instances directories will not be special when you are in the CD environment. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TJNII l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/17238683193fdc0165daf7f.gif)
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Sun Jan 09, 2011 8:36 pm Post subject: |
|
|
Hu wrote: | Assuming use of the LiveCD, then there is no need to exclude proc and dev. They are mount points for virtual filesystems, so the on-disk instances directories will not be special when you are in the CD environment. |
You'll want to exclude proc and sys, otherwise you start picking up things like kernel memory that really bloat your backup. You can exclude dev if you know what you're doing, but you will need to populate /dev with some files when reassembling the backup if omitted. I usually use the --one-file-system option with tar and point it at / to exclude dev, proc, sys, NFS mounts, and anything else not on my root disk. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
molot Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/2352927594cd81301f1484.jpg)
Joined: 26 Feb 2005 Posts: 214 Location: Warsaw, Poland
|
Posted: Sun Jan 09, 2011 9:07 pm Post subject: |
|
|
TJNII wrote: | You'll want to exclude proc and sys, otherwise you start picking up things like kernel memory that really bloat your backup. | Unless, like Hu wrote, computer is running livecd gentoo, and we're backing up the hdd instance. Then proc in context of a backup will have nothing to do with livecd's proc. If any normal files ended there, it might be good to know about them. And backup of a partition that have live, up and running OS on it is hardly ever good idea. Individual directories - yes, but not whole tree. _________________ "I just have to run faster than the slowest party member" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|