10-14-2008
clone systems with tar command
I have several machines which I want to be exactly identical. It is the first time I am trying to clone machines and I searched on the internet and found many people archive and extract their disks using some tools, using dd, and I also found someone using tar. I read about different tools. I tried g4u, a tool for hard disk image cloning, but it didn't boot. Now, I am more familiar with tar and I created an archive of the whole file system of one machine using tar (tar -czvlps −−same−owner −−atime−preserv -f machine.tgz /) and I extracted this tar on other machines (tar -xslpzf machine.tgz). I did this with machines booted on CDs, mounting the drives and copying over network.
When I reboot I see the new machines with hostname as expected, I try login with the old password combinations, however I get "permission denied" and I am thrown back to login. When I try ssh to a new machine I get "unable to get valid context." Permissions and files should be exactly the same on the new machine (and look as if they were, although I didn't do any extensive comparisons).
Now before I try other stuff or go into long search of the problem, I am suspecting that I miss something and I want to ask people who have done this before. Am I making some stupid mistake? I suppose that tar and dd are more or less doing the same thing, or is there any forcing argument for using dd instead. Any help appreciated.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
What is the correct mkfs syntax to create mirrored disk files systems? I need to make the file system 20gb. For example:
machine# mkfs -F ufs /dev/md/dsk/d40
size not specified
ufs usage: mkfs special size(sectors) \
-m : dump fs cmd line used to make this partition
-V : print this... (4 Replies)
Discussion started by: GLJ@USC
4 Replies
2. UNIX for Dummies Questions & Answers
I'm new to Unix, :confused:
What is a TAR Command? What does it do? I need simple explanation. (4 Replies)
Discussion started by: technie07
4 Replies
3. Shell Programming and Scripting
Hi
I am very poor at scripting.:o
I need to develop a script that should tar up all the filesystems on the machine on to a single filesystem called /tarfilesystem.
Any suggestions ...
Thank You very much (1 Reply)
Discussion started by: urrahman_zia
1 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies
5. UNIX for Dummies Questions & Answers
As you will verify, I am a really naive user of AIX 5.1. As such I wonder if you could possibly let me know of a command or procedure I could use to automatically, globally and safely, remove all useless files from my machine. I'm not referring to my own files because I perfectly know which of them... (1 Reply)
Discussion started by: ahjchr
1 Replies
6. Shell Programming and Scripting
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies
7. What is on Your Mind?
I have been wondering how do Systems Administrators do the jump into Systems Engineering? Is it only a matter of time and experience or could I actually help myself get there?
Opinions? Books I could read?
Thanks a lot for your help! (0 Replies)
Discussion started by: svalenciatech
0 Replies
8. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
9. Shell Programming and Scripting
I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command?
What I'm doing now is
tar xvf a.tar (this will output 1.Z and 2.Z)
gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies
10. UNIX for Dummies Questions & Answers
Hello Team,
Would you please help me with a UNIX command that would check if file is a tar file.
if we dont have that , can you help me with UNIX command that would check if file ends with .tar
Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies
LEARN ABOUT OSF1
clonefset
clonefset(8) System Manager's Manual clonefset(8)
NAME
clonefset - Creates a read-only copy of an AdvFS fileset
SYNOPSIS
/usr/sbin/clonefset domain fileset clonename
OPERANDS
Specifies the name of an existing AdvFS file domain. Specifies the name of the original fileset that the clonefset utility will clone.
Specifies the name of the read-only fileset created by the clonefset utility.
DESCRIPTION
The clonefset utility enables you to perform online backups of active files by making a read-only copy (clone) of an active fileset. Once
you create and mount a clone fileset, you can back up the clone using the vdump command or other supported backup utility (the dump command
is not supported by AdvFS). Note that the clonefset utility only clones AdvFS filesets; it does not clone UFS file systems.
A clone fileset is a read-only snapshot of fileset data structures (metadata). When you clone a fileset, the utility copies only the
structure of the original fileset, not its data. When you modify files in the original fileset, the file system copies the original pages
to the clone fileset. In this way, the clone fileset contents remain the same as when you first created it.
You can create new versions of a clone fileset, but you can maintain only one clone per fileset at a time. You cannot rename a clone file-
set, but there is a workaround. You can remove an existing clone fileset (and all its files) by using the rmfset command, then create a new
one with the new name.
RESTRICTIONS
Each fileset within a domain must have a unique name of up to 31 characters. All whitespace characters (tab, new line, space, and so
forth) and the / # : * ? characters are invalid for fileset names.
Do not create a clone fileset if the available disk space for the file domain is less than 5 percent of the total. When a file domain runs
out of disk space, the file system loses its ability to maintain the consistency of files within clone filesets. When the file system can
no longer maintain consistency, it displays warning messages similar to the following on the user's terminal and to the console: WARNING:
advfs cannot copy-on-write data to a clone file. WARNING: encountered the following error: ENO_MORE_BLKS (-1040) WARNING: do not continue
using the clone fileset. WARNING: original file set: name=mnt, id=2c06a73f.00027192.00000001.8001 WARNING: clone file set: name=clone,
id=2c06a73f.00027192.00000002.8002 WARNING: file id = 0000000a.8002
This message also appears in the /var/adm/syslog.dated/latest_boot_date/kern.log file.
EXAMPLES
The following example creates a read-only copy of the credit_fs fileset that resides in the accounts_dmn file domain. The clone fileset
name in this example is credit_clone1. This example also performs an online backup and removes the clone fileset after the backup is com-
plete: # mkdir /mnt/credit_clone1 # clonefset accounts_dmn credit_fs credit_clone1 # mount -t advfs account_dmn#credit_clone1
/mnt/credit_clone1 # vdump /mnt/credit_clone1 # umount /mnt/credit_clone1 # rmfset account_dmn credit_clone1
SEE ALSO
Commands: tar(1), showfdmn(8), vdump(8), vrestore(8)
Functions: advfs_clonefset(3)
File Formats: advfs(4)
clonefset(8)