How to gzip file system for copying to /dev/sda2 ? ( Too many levels of symbolic links )

What is the syntax to gzip a tar system and handle symbolic links properly?

I tried this:

sudo gzip -r /home/z3/ti-ezsdk_dm816x-evm_5_05_01_04/targetfs/fs

gzip: …/targetfs/fs/usr/bin/top: Too many levels of symbolic links
gzip: …/targetfs/fs/usr/bin/mesg: Too many levels of symbolic links
gzip: …/targetfs/fs/usr/bin/lastb: Too many levels of symbolic links

Bcckground:

I have been developing my board using tftp boot loading of the uImage and NFS loading of the file sys.

Now that development is done, what is the easiest method to copy the filesystem to /dev/sda2 ?

I think something like this should work

mkdir -p /mnt/part2
mount /dev/sda2 /mnt/part2
tar xvf fs.tar.gz -C /mnt/part2/

Thanks in advance,

-Ed

This seemed to work:

On my Ubuntu host I backed up the target’s filesystem:

sudo tar -zcvpf ./targetfs-2013-03-14.tar.gz --directory=…/targetfs/fs/ --exclude=dev/pts --exclude=backups .

I copied targetfs-2013-03-14.tar.gz to the target’s filesystem, boot the target, mounted sda2, removed everything that was on it, and extracted the file system:

tar xvf targetfs-2013-03-14.tar.gz -C /mnt/part2

-Ed