|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
Live backup
Hello I have small hosting server with some jails. All data like mysql and websites,email store are backed up to ftp weekly.
But I have an externl drive I intend to dump too. Cant really stop any thing so it will have to be a live dump Code:
dump -h0 -0Lauf /mnt/usb/backups/usr.dump /usr The /usr is about 100GB or more so while dump takes a snap I guess the server is going to grind to a stop any way. This is a remote server so the plan is in a disaster I could boot off the cd setup the disk ( via ip kvm ) and restore the dumps from the external drive saving me a shed load of setting stuff. I would also be much happy about remote upgrades with some dump files. But is there a less intensive way so every thing doesnt grind to a halt. Last edited by J65nko; 21st December 2009 at 09:18 PM. Reason: Code tags added |
|
|||
mmm well seems I have nothing to worry about apart from a few sluggish moments its seems to handle it fine
|
|
|||
The problem with dump that you only can dump a complete filesystem. And it needs space for the filesystem snapshot if you use that "-L" flag,
As a side remark, the OpenBSD dump is different, that can do a level 0 dump of parts of a filesystem, but that doesn't help you here. From a recently installed FBSD 7.2 system with a ports collection, apache22 and mailman install: Code:
df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad0s2a 496M 145M 311M 32% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad0s2e 496M 12K 456M 0% /tmp /dev/ad0s2f 33G 1.6G 28G 5% /usr /dev/ad0s2d 1.4G 148M 1.2G 11% /var An overview of the '/usr' directories: Code:
# ls -l /usr total 52 drwxrwxr-x 2 root operator 512 Dec 20 20:09 .snap drwxr-xr-x 2 root wheel 7168 Dec 21 01:30 bin drwxr-xr-x 2 root wheel 512 Dec 20 20:12 compat drwxr-xr-x 2 root wheel 512 Dec 20 20:12 games drwxr-xr-x 47 root wheel 4608 May 1 2009 include drwxr-xr-x 6 root wheel 11264 Dec 20 20:28 lib drwxr-xr-x 5 root wheel 512 May 1 2009 libdata drwxr-xr-x 5 root wheel 1536 Dec 20 20:28 libexec drwxr-xr-x 15 root wheel 512 Dec 21 01:56 local drwxr-xr-x 2 root wheel 512 Dec 20 20:12 obj drwxr-xr-x 69 root wheel 1536 Dec 21 01:55 ports drwxr-xr-x 2 root wheel 5120 Dec 20 20:28 sbin drwxr-xr-x 26 root wheel 512 Dec 20 20:11 share drwxr-xr-x 22 root wheel 512 Dec 20 20:12 src Code:
# for X in $(ls -d /usr/*) ; do du -sk $X ; done 27910 /usr/bin 2 /usr/compat 2 /usr/games 17700 /usr/include 38954 /usr/lib 92 /usr/libdata 18302 /usr/libexec 194532 /usr/local 2 /usr/obj 564984 /usr/ports 15754 /usr/sbin 339336 /usr/share 506084 /usr/src Code:
# for X in $(ls -d /usr/*) ; do du -sh $X ; done 27M /usr/bin 2.0K /usr/compat 2.0K /usr/games 17M /usr/include 38M /usr/lib 92K /usr/libdata 18M /usr/libexec 190M /usr/local 2.0K /usr/obj 552M /usr/ports 15M /usr/sbin 331M /usr/share 494M /usr/src
If I would be short of space I would have to analyze where the volatile data is stored. That would be "/usr/local/mailman/archives" So I could add in another disk and move some of the "/usr" disk directories, like those mailman archives, to the second disk to make more space for filesystem snapshots. Or rethink the partition scheme and create separate filesystems for some of the '/usr' subdirectories. How much space do you have left on your system (df -h)?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
I think I am ok with space
Code:
df -h Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 496M 138M 318M 30% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0s1e 496M 1.1M 455M 0% /tmp /dev/da0s1f 217G 116G 84G 58% /usr /dev/da0s1d 2.9G 667M 2.0G 25% /var /usr/jails/basejail 217G 116G 84G 58% /usr/jails/dd.co.uk/basejail devfs 1.0K 1.0K 0B 100% /usr/jails/tt.co.uk/dev fdescfs 1.0K 1.0K 0B 100% /usr/jails/yy.co.uk/dev/fd procfs 4.0K 4.0K 0B 100% /usr/jails/jj.co.uk/proc /dev/da1s1d 289G 49G 216G 19% /mnt/usb with the nodump Code:
ls -ldo /usr/BACKUPS drwxr-xr-x 4 root wheel nodump 512 Dec 17 15:39 /usr/BACKUPS Code:
du -h -d 0 /usr/BACKUPS 66G /usr/BACKUPS |
|
|||
It finished fine
Code:
# dump -h0 -0Lauf /mnt/usb/backups/usr.dump /usr DUMP: Date of this level 0 dump: Mon Dec 21 21:14:00 2009 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping snapshot of /dev/da0s1f (/usr) to /mnt/usb/backups/usr.dump DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 31403777 tape blocks. DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: 3.60% done, finished in 2:13 at Mon Dec 21 23:37:41 2009 DUMP: 14.28% done, finished in 1:00 at Mon Dec 21 22:28:59 2009 DUMP: 26.27% done, finished in 0:42 at Mon Dec 21 22:16:02 2009 DUMP: 41.50% done, finished in 0:28 at Mon Dec 21 22:07:08 2009 DUMP: 52.55% done, finished in 0:22 at Mon Dec 21 22:06:31 2009 DUMP: 61.46% done, finished in 0:18 at Mon Dec 21 22:07:45 2009 DUMP: 71.22% done, finished in 0:14 at Mon Dec 21 22:08:05 2009 DUMP: 79.86% done, finished in 0:10 at Mon Dec 21 22:09:02 2009 DUMP: 92.10% done, finished in 0:03 at Mon Dec 21 22:07:48 2009 DUMP: DUMP: 31404451 tape blocks on 1 volume DUMP: finished in 2941 seconds, throughput 10678 KBytes/sec DUMP: level 0 dump on Mon Dec 21 21:14:00 2009 DUMP: Closing /mnt/usb/backups/usr.dump DUMP: DUMP IS DONE When I go into interactive restore though it all seems to be there Last edited by J65nko; 22nd December 2009 at 12:05 AM. Reason: Added start code tag ;) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HOWTO: TeX Live 2008 on FreeBSD | vermaden | Guides | 14 | 3rd January 2011 08:52 AM |
Live *BSD Distribution | JMJ_coder | Other BSD and UNIX/UNIX-like | 22 | 12th February 2010 05:29 PM |
can't boot live *BSD through QEMU! | atphalix | Other BSD and UNIX/UNIX-like | 7 | 12th June 2009 02:04 AM |
backup freeBSD 7.0 using Backup Exec | ccc | FreeBSD General | 2 | 25th April 2009 09:23 PM |
pf and xbox live | _mg_ | FreeBSD Security | 2 | 7th January 2009 10:32 PM |