Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Backups

Unix Files Transferred To CD

Submitted by on November 19, 2005 – 10:40 pm

In our example we were requested to archive a 741 mb directory to CD. The source data resided on a Unix data server.

1. we copied the source data to a newly created directory {project} into an alternate area .
2. do > cd /newly created directory
3. do > tar clf – . |compress > ../project.tar.Z
4. do > cd ..
5. rm –r project
6. we then moved that .Z file via ftp or whatever transfer agent you wish to a local area .
7. then you burn it to CD.

* For example, to archive a directory named “project”, use the commands below:

Note that we are saving the archive in the parent directory (../project.tar.Z) so that `tar’ won’t try to archive its own archive!!. Also,

note that, once archived, the original directory is removed.

Any time you want a list of the files in the archive, use:
tar tvf project.tar | more
or
zcat project.tar.Z | tar tvf – | more
To extract all the files from the archive, type:
mkdir project
cd project

zcat ../project.tar.Z | tar xvf –

* you may wish to add a readme file with your backup denoting the above information.

Print Friendly, PDF & Email

Leave a Reply