# Backing Up the system with all packages



## dheerajsuthar (Jun 14, 2010)

Hi,
I have FreeBSD 8 Release(updated) installed. Struggling with poor net and power cuts I installed all the nescessary s/w like Xfce, emacs, etc. I now want to backup whole system in case if any thing wrong happens(as I am new I am still exploring the system). I want to make copy of whole system on my usb hard disk(especially packages as download is too costly for me ).I checked the forum and found this useful thread:
http://forums.freebsd.org/showthread.php?t=185
However I still have two doubts. 
1>Which partition I will have to backup(for backing entire system especially all installed packages.).My fstab:

```
# Device		Mountpoint	FStype	Options		Dump	Pass#
/dev/ad4s3b		none		swap	sw		0	0
/dev/ad4s3a		/		ufs	rw		1	1
/dev/ad4s3e		/tmp		ufs	rw		2	2
/dev/ad4s3f		/usr		ufs	rw		2	2
/dev/ad4s3d		/var		ufs	rw		2	2
```
2>According to the how to if I mount the usb hard disk to say /mnt/usb. Now if I backup the filesystem using dump won't it backup the /mnt/usb directory too. Then it will go on backing up the usb hard disk(the target for backup itself) too, resulting in recursive backup(perhaps never ending.)
Kindly help me in resolving these doubts. Thanks in advance.


----------



## wblock@ (Jun 14, 2010)

Back up /, /var, and /usr.  Added packages can put files in all three, and your configuration in /etc and /usr/local/etc are important.
Don't need /tmp since it's temporary stuff.

dump doesn't cross filesystems, and your USB drive is a different filesystem (or you wouldn't have to mount it in /mnt).  So it won't do a recursive backup.


----------



## dheerajsuthar (Jun 14, 2010)

Thanks for your kind reply wblock.


			
				wblock said:
			
		

> Back up /, /var, and /usr.  Added packages can put files in all three, and your configuration in /etc and /usr/local/etc are important.
> Don't need /tmp since it's temporary stuff.


So i will have to find corresponding partition from fstab and do the backup.


> dump doesn't cross filesystems, and your USB drive is a different filesystem (or you wouldn't have to mount it in /mnt).  So it won't do a recursive backup.


Just one more doubt here. I have one Windows partition on hard disk itself(along side freebsd,ad4s2), So I think same rule applies here too. It won't be backed with dump even if my target is located on it(Windows partition). (Reason for choosing the Windows partition as backup target is that then I can write it to DVD using Nero, as my dvd rw is not working in FreeBSD.)
Is my assumption correct wblock?
My fdisk -v:

```
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 2048, size 204800 (100 Meg), flag 0
	beg: cyl 2/ head 0/ sector 33;
	end: cyl 205/ head 3/ sector 19
The data for partition 2 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 206848, size 409395200 (199900 Meg), flag 0
	beg: cyl 205/ head 3/ sector 20;
	end: cyl 1023/ head 3/ sector 51
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 409602048, size 215540400 (105244 Meg), flag 80 (active)
	beg: cyl 1023/ head 255/ sector 63;
	end: cyl 1023/ head 15/ sector 63
The data for partition 4 is:
<UNUSED>
```


----------



## wblock@ (Jun 14, 2010)

dump will take device nodes (/dev/ad4s3a) or mount points from /etc/fstab (/) as the filesystem, you don't have to look them up.

It's not quite clear what you mean by "target".  dump only understands UFS, so it won't read Windows filesystems.  If you plan on writing the dumpfile on an NTFS partition, that's difficult also because FreeBSD can't write to NTFS natively, although there are ports that can.

If you want to write the dumpfiles to a DVD, growisofs from the sysutils/dvd+rw-utils port will do it.


----------



## dheerajsuthar (Jun 14, 2010)

wblock said:
			
		

> dump will take device nodes (/dev/ad4s3a) or mount points from /etc/fstab (/) as the filesystem, you don't have to look them up.
> 
> It's not quite clear what you mean by "target".  dump only understands UFS, so it won't read Windows filesystems.  If you plan on writing the dumpfile on an NTFS partition, that's difficult also because FreeBSD can't write to NTFS natively, although there are ports that can.
> 
> If you want to write the dumpfiles to a DVD, growisofs from the sysutils/dvd+rw-utils port will do it.



Thanks again for reply wblock. The problem is that FreeBSD doesnot recognize my dvd rw. However I used ntfs-fuse for writing to windows partition and it worked. 
I will also try growisofs once i get it installed. However thanks a ton for your kind replies. 
-------------------------------
Mods can kindly mark this thread as solved.


----------

