Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created a ton of symbolic links using ln -s ../folder/subfolder mylinkname.

How can I back this folder of "links" up so I could restore it at a later date? A compressed file or something similar would be ideal so I could move it off onto another Linux box while I rebuild it.

share|improve this question
2  
Just tar them? –  Daniel Beck Dec 21 '12 at 12:46
    
I knew it was a stupid question being a complete novice with Linux. I was trying to use gzip and getting errors - figured it would require some clever workaround or something. Fail. –  Kez Dec 21 '12 at 13:35
    
Gzip and Bzip2 can only handle a single file as input. They compress, they don't achive. That's why they're usually combined with tar. –  Daniel Beck Dec 21 '12 at 16:34
2  
Just a warning, because it's not quite clear what you want: the tar solution will only backup the symlinks themselves, not the content they link to. –  eldering Dec 23 '12 at 19:10
    
That's what I'm after - just backing the folder of links up, no content. Thanks for the heads up though! –  Kez Dec 27 '12 at 9:36

1 Answer 1

up vote 3 down vote accepted

Ad Daniel commented, you can backup the directory using tar.

tar -cvf folder.tar folder

You can add compression using -j or -z if you want to, check man tar or info tar

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.