Backing up using fssnap and ufsdump


 
Thread Tools Search this Thread
Operating Systems Solaris Backing up using fssnap and ufsdump
# 1  
Old 11-17-2010
Backing up using fssnap and ufsdump

Hi all!

Here's my situation:
I need to backup a running system before I can bring it down
I've tried performing a ufsdump while it's in multi-user mode but my ufsdump fails because there is too much activity on the system.

So I read that I could use fssnap to create a snapshot of (in my case / ) and then I could use ufsdump to create a backup of that snapshot.

But I get confused trying to understand how I am able to get this to work


I noticed that I cannot use fssnap on the same filesystem so I've attached 2 extra HDD's (/backup is a 146GB and /mnt is 72GB)

So I created a snapshot of / with a maxsize of 16 ( / is only 15GB)
Code:
#fssnap -F ufs -o maxsize=16g,backing-store=/backup /

# /usr/lib/fs/ufs/fssnap -i /

Snapshot number               : 0

Block Device                  : /dev/fssnap/0

Raw Device                    : /dev/rfssnap/0

Mount point                   : /

Device state                  : idle

Backing store path            : /backup/snapshot0

Backing store size            : 8352 KB

Maximum backing store size    : 16777216 KB

Snapshot create time          : Wed Oct 20 15:18:30 1999

Copy-on-write granularity     : 32 KB

I then copied the VTOC to my 72GB drive (/mnt)
Code:
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t3d0s2

fmthard:  New volume table of contents now in place.

 

# newfs /dev/rdsk/c0t3d0s2

newfs: construct a new file system /dev/rdsk/c0t3d0s2: (y/n)? y

Warning: 2496 sector(s) in last cylinder unallocated

/dev/rdsk/c0t3d0s2:     143349312 sectors in 23332 cylinders of 48 tracks, 128 sectors

        69994.8MB in 1459 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,

Initializing cylinder groups:

............................

super-block backups for last 10 cylinder groups at:

 142447776, 142546208, 142644640, 142743072, 142841504, 142939936, 143038368,

 143136800, 143235232, 143333664

 

# mount -F ufs -o rw /dev/dsk/c0t3d0s0 /mnt

The command in question is this:

This will create a backup of /backup (disk2) and restore it under /mnt (disk3)
Code:
# ufsdump 0f - /backup | ( cd /mnt ; ufsrestore xvf - )

After I started this job I came across this error

DUMP: "yes" or "no"? DUMP: NEEDS ATTENTION: Do you want to attempt to continue? ("yes" or "no")

I said yes, and it continued on; said something about
DUMP: Warning - block 1651667564 is beyond the end of hard disk

Right now it is still performing the ufsdump / ufsrestore
So I will know later in the day, or tomorrow when this is finished

So I don't know if it will fail, I know I need to install the boot block and then I will try to boot from that drive

But does anyone have any ideas or better alternatives to how I am doing this?
My references were the sun doc sites but I couldn't get a very good idea as they were pointing to tape and I am pointing to hard disk (which should work the same I think)
# 2  
Old 11-17-2010
It should be:
Code:
# ufsdump 0f - /dev/rfssnap/0 | ( cd /mnt ; ufsrestore xvf - )

/backup is used only to store data that has changed since creating snapshot. /dev/rfssnap/0 contains the snapshot itself. I didn't test it though Smilie
# 3  
Old 11-17-2010
bartus thank you! Smilie

I will let you all know how this goes for me.

Here's what I did!

Code:
# fssnap -F ufs -o maxsize=5g,backing-store=/backup,unlink / 
/dev/fssnap/0

# /usr/lib/fs/ufs/fssnap -i
Snapshot number               : 0
Block Device                  : /dev/fssnap/0
Raw Device                    : /dev/rfssnap/0
Mount point                   : /
Device state                  : idle
Backing store path            : /backup/snapshot0 <UNLINKED>
Backing store size            : 896 KB
Maximum backing store size    : 5242880 KB
Snapshot create time          : Thu Oct 21 16:15:28 1999
Copy-on-write granularity     : 32 KB

# ufsdump 0f - /dev/rfssnap/0 | ( cd /mnt ; ufsrestore xvf - )
Verify volume and initialize maps
  DUMP: Date of this level 0 dump: October 21, 1999  4:15:28 PM EDT
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rfssnap/0 to standard output.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 32 Kilobyte records
  DUMP: Estimated 30682412 blocks (14981.65MB).
Dump   date: October 21, 1999  4:15:28 PM EDT
Dumped from: the epoch
Level 0 dump of an unlisted file system on cm02:/dev/rfssnap/0
Label: none
  DUMP: Dumping (Pass III) [directories]
Extract directories from tape

So far so good Smilie It's currently making the nodes

After looking at the documentation again (for anyone else who still has questions)

The backing-store is a location that houses any changes since the snapshot you created.
The raw device is the virtual device the system creates to hold the snapshot in my case (/dev/rfssnap/0)

Hopefully all goes well
I'll update when this is finished
# 4  
Old 11-19-2010
It worked!

Thanks for all the help! Smilie
All I had to do was install the boot partition

Code:
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Pls. help with fssnap - Solaris

Hi, I have used Solaris but new to ZFS. I need to backup the root volume using fssnap. zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT pool5 808G 552G 256G 68% ONLINE - rpool 136G 20.9G 115G 15% ONLINE - zfs list NAME USED... (3 Replies)
Discussion started by: samnyc
3 Replies

2. Shell Programming and Scripting

Making a fssnap of / and /var

Hello to everyboyd i have a list of filesystem that i want to do a fssnap the idea is the bakcup / /var /dbo /Free The logic is when i do a fssnap of / or /dbo or /Free the file that generetes the fssnap goes to /var but when i do a fssnap of /var goes to /(and some folder). Can anybody... (0 Replies)
Discussion started by: enkei17
0 Replies

3. Solaris

Confused about fssnap

Hello All, I am confused about the below outputs when I have tried fssnap output using diff path. bash-3.00# /usr/lib/fs/ufs/fssnap -i ============>> o/p 1 Snapshot number : 0 Block Device : /dev/fssnap/0 Raw Device :... (0 Replies)
Discussion started by: vaibhav.kanchan
0 Replies

4. Solaris

Can fssnap be used as a compression tool (Solaris 10)?

Friends, I am learning the working of fssnap command. Suppose there is a directory named /datadir which is of size 500mb. I had taken the snapshot by means of the following command: #fssnap -F ufs -o bs=/snapshotdir /datadir { it shows the o/p as /dev/fssnap/0 } My question is if... (2 Replies)
Discussion started by: saagar
2 Replies

5. AIX

what am i backing up

we are running aix on are server. we would like to start doing online backups, but the software company that we use is not beeing much help on what files we are backing up. is there a command that will tell me what files that we are backing up. they offer a service that would back it up for use,... (3 Replies)
Discussion started by: shane.hankins
3 Replies

6. Solaris

fssnap error :snapshot error: File system could not be write locked

Hi Guys. This is part of my filesystem structure : Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 47G 5.2G 42G 12% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% ... (2 Replies)
Discussion started by: aggadtech08
2 Replies

7. Solaris

fssnap ioctl error

For some reason when I try to take a snapshot of the root slice on a particular machine I get an ioctl 22 error. I can't seem to find much on the problem by searching the internet other than some realtime processes such as ntp that use mlock can cause this to happen. I tried running it with truss... (2 Replies)
Discussion started by: ilikecows
2 Replies

8. Solaris

how can we take fssnap of different filesystems for the same point-in-time?

I managed to work with fssnap for snapshotting filesystems but, my question is..., is there a way we could get snapshots for the same point for multiple FS. Wating on your help..., as i already did my trials what all i can!! -ilan (0 Replies)
Discussion started by: ilan
0 Replies

9. UNIX for Dummies Questions & Answers

Best practises for backing up

Hi, I'm about to start a regular backup schedule for my Linux system. I need some pointers if I may :) The system is *mainly* used as a personal home computer (it's actually a laptop running SuSE 9.2) although I do host some client material from it being a PHP developer. I know that in... (2 Replies)
Discussion started by: d11wtq
2 Replies

10. UNIX for Dummies Questions & Answers

backing up

Ok I'm trying to backup a HD using ufsdump but no matter what I do it rewinds the tape after the dump. Now the tape isn't full (only 285mb) and I still have 6 more partitions I want to put on this tape. How can I stop the tape from rewinding because I can't think of anything. Also is there any... (4 Replies)
Discussion started by: merlin
4 Replies
Login or Register to Ask a Question