UNIX Tar file backup


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UNIX Tar file backup
# 1  
Old 04-11-2014
UNIX Tar file backup

I want to create a tar file that backup all my recent work. I have no idea how Tar file works and I am new to Unix Please help
# 2  
Old 04-11-2014
Welcome to forums.

You have to read man pages man tar

Some Examples for you :
Code:
# Compress
$ tar -zcvf file.tar.gz mydirectory/

# To view
$ tar -tvf file.tar.gz

# To Extract file/folders in current directory
$ tar -xvf file.tar.gz

# To Extract file/folders in tar to some destination directory of your interest
$ tar -xvf file.tar.gz -C /home/user/my_files/XYZ

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

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

2. Shell Programming and Scripting

File Backup - TAR help

Hi, Another rookie here. I have a script I am developing to backup files from various directories onto a windows machine. Script description: - mv files from various directories - tar all files in that directory - export to windows server for safe keeping, external backups. The... (5 Replies)
Discussion started by: mcclunyboy
5 Replies

3. AIX

how to take tar backup of the contents of a file

Hi I have a file named files.2.backup which holds the location of some directory and file i,e $ cat files.2.backup /d01/app/oracle/product/7.3.2/dbs/fortest_syst_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortest_temp_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortestdata_01.dbf... (5 Replies)
Discussion started by: sumanbangladesh
5 Replies

4. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

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

Backup with tar

Hi friends, I am planning to backup my Solaris Servers to SAN storage using tar. Also palnning to automate the job using Crontab. Can anyone advise how to make the date change automatically everyday for backup. Pls correct me if I am wrong. Thanks (7 Replies)
Discussion started by: solaris5.10
7 Replies

6. Filesystems, Disks and Memory

Tar file from Linux server to PC for backup

I have a Linux email server, I want to backup all /home /var... by tar command and copy to my PC for backup everyweek. The Linux serve rhave ftp function. Is there any program to help backup my file? any url welcome many thank. (8 Replies)
Discussion started by: zp523444
8 Replies

7. UNIX for Dummies Questions & Answers

Tar backup

I am trying to do a full system backup using tar. It then after maybe 12 or so hours comes up with tar: write error: unexpected EOF. I have thoroughly cleaned the drive and tried to use a different drive but it still gives me this error. Can someone help. I am on solaris 8. (1 Reply)
Discussion started by: TMashie
1 Replies

8. Shell Programming and Scripting

How to exclude file in tar backup?

I am taking a backup of area with the following command:- tar -cf -./* |/usr/contrin/bin/gzip >xxx.tar.gz. The area contains following files :- xxxx yyyy zzzzz asdaD DASdD WQWEE I want to backup all the files except yyyy from the following area. I checked manual page of tar but I... (2 Replies)
Discussion started by: kamlesh_p
2 Replies

9. UNIX for Dummies Questions & Answers

tar file in unix

Hi all, Please give me one example session to create a tar file in unix Shruti (5 Replies)
Discussion started by: shruti_mgp
5 Replies

10. UNIX for Advanced & Expert Users

tar backup

Hi all, I would like to append list of files to already taken tar backup file. can anybody help? last month backup : cd /accounts/11 tar -cvf monthback.tar * Now I want to add /accounts/12 to monthback.tar is it possible? Krishna (1 Reply)
Discussion started by: krishna
1 Replies
Login or Register to Ask a Question