Solved

Create tar backup from file list

Posted on 2010-11-23
4
855 Views
Last Modified: 2013-12-26
Hi,
 I have a text file with ~200 files and folders names and complete paths of files in Linux (Debian Lenny) system that I want to backup to .tar archive.

FolderAndFilesList.txt:
/etc/resolv.conf
/etc/init.d/xdaemon.sh
/opt/conf/

Which GUI o CLI software can I use to create backup archive like this:
tar -cpf /media/backups/BackupFile.tar xxxxunknownoption < FolderAndFilesList.txt

Thank you.
0
Comment
Question by:matasimi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:nilayaksa
ID: 34198203
I think you can do with "tar cvf yourarchive.tar -l yourfilelist
0
 
LVL 12

Accepted Solution

by:
hfraser earned 500 total points
ID: 34198791
Create an empty archive file, and then do an update as in:

while read x; do tar -uvf test.tar $x; done <file.list

The -u switch will append to the archive any new or modified files. Starting with an empty archive (or at least one with a seed file) will record only the files listed in file.list.
0
 

Author Closing Comment

by:matasimi
ID: 34199985
It is works!
Thank you!
Also I  found that tar command has an option "-T":
tar -cpf BackupFile.tar -T FolderAndFilesList.txt"

0
 
LVL 12

Expert Comment

by:hfraser
ID: 34201784
Well that's an even better solution. I'm ashamed I missed it.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
Microsoft will be releasing the Windows 10 Creators Update in just a matter of weeks. Are you prepared? Follow these steps to ensure everything goes smoothly and you don't lose valuable data on your PC.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question