LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fully restored from tar.gz Backup? (http://www.linuxquestions.org/questions/linux-software-2/fully-restored-from-tar-gz-backup-747733/)

KrzysieQ 08-15-2009 06:17 AM

Fully restored from tar.gz Backup?
 
Hi, I make backup of my System using tar:
Code:

tar cvpPfz /magazyn/Backup/`date +%m-%d-%Y-%H-%M`.tar.gz --exclude={"/home/*","/media/*","/mnt/*","/proc/*","/sys/*","/tmp/*","/var/run/*","/var/tmp/*","/root/*","/magazyn/*","/usr/src/*"} /
I can restore that backup any time, but files which was created after last backup will remain. Is it any way to remove that files in a simple way?

watcher69b 08-16-2009 03:41 PM

I think tar maybe a bit too simple for that. Have you tried something like Mondo Archive?

::: 08-16-2009 06:14 PM

Quote:

Originally Posted by watcher69b (Post 3645669)
I think tar maybe a bit too simple for that. Have you tried something like Mondo Archive?

what? so you are simple just because you're someone one can get good along with? :)

Code:

Is it any way to remove that files in a simple way?
there's a --diff option. use this to find the files which are not in the backup. filter the !--exclude and then rm them :). it's brute force and i think there is a more elegant way to do this but as i used to say: when you hit, hit hard ;).


All times are GMT -5. The time now is 04:40 PM.