Solved

Create tar backup from file list

Posted on 2010-11-23
4
849 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
  • 2
4 Comments
 
LVL 1

Expert Comment

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

Accepted Solution

by:
hfraser earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Well that's an even better solution. I'm ashamed I missed it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Veeam backup Catalog 6 60
apply ddos protection on all network interface 2 49
Parse DNS log 3 32
Linux as a middle box 7 0
The purpose of this article is to demonstrate how we can use conditional statements using Python.
By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now