LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2013, 01:29 PM   #1
kmart92
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
flagging files to be backed up using tar?


Hi.

I am a newbie to both Linux and these forums. I wasn't sure if this question should go in the Newbie section or in the General section so if this isn't the appropriate section hopefully a mod can move it to the right one.

The short version of my question: Is there a way to flag files to be backed up using tar so that if I execute tar in a directory where some of the files are flagged and others aren't, it will only include the flagged files?

Full background: I am making some modifications to a Linux embedded device. Most of the changes/additions will be placed on an external drive attached to the device so I can back that up easily. However, some of the changes add or modify files on the internal storage of the device. I've read that firmware updates are sometimes remotely pushed by the device manufacturer and when that happens it can wipeout any changes I've made to the internal storage.

So I'd like to find an easy way to backup only the files that are added or modified. My idea is that I could create a tarball that when extracted from the root directory would add all these new files again in one easy step.

My problem is that the original steps to modify the device add/change files in many different directories. Is there some easy way I can make or flag each of these files so that only the modified/added files would be included when I create the tarball and the stock/manufacturer's files would be excluded as these might be changed when the firmware is updated? Hopefully something easier than having to individually list each files on the command line. (Or even if I could create the list of files by using the ls command and piping the output to a file so I don't have to manually type the full path & name for each file.)

Any ideas? Is tar what I want to use for this?
 
Old 09-02-2013, 01:40 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Have a look at tar's -N option, that only stores files newer than a certain date into the archive, that may be what you are seeking for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup solution with list of backed up files in db Bronta Linux - Newbie 1 10-15-2012 08:27 PM
[SOLVED] How do I SSH into an Encrypted partition? I have backed up all of my files on it theif519 Linux - Newbie 3 07-05-2011 11:15 AM
Which files & paths in the Linux tree should be backed up? HellesAngel Linux - Software 7 02-22-2011 07:29 AM
BackupPC returns 0 files backed-up on SME 7.0 Heibrin Linux - Server 0 12-02-2006 03:31 AM
tar problem with backed up home directory dkaplowitz Linux - General 1 08-02-2003 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration