Some questions about Hard-links, and backups

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Recently I accidentally whipped out a directory with important stuff, and now I'm starting to think about the best ways to have backups, a remote copy It's already in place but I was thinking, about



A scripts that replicates my directory structure in another directory, and makes hard links for all the files in the directory, so In case I delete something It still exists.



But my question here is,




  • Does git version control will still work?


  • Should I replicate the structure and make hard links for each file or hard links the the directories?

What I want is to be able to have a hard links to the same inodes, in some other place, so I don't harm the integrity of the files if I delete or something, the hard links should be updated with a cronjob, so I always have a pointer to them.



The concern is If git will respect the hardlinks?










share|improve this question























  • Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
    – Michael Homer
    1 hour ago










  • Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
    – Michael Homer
    1 hour ago










  • If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
    – sebasth
    24 mins ago










  • @MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
    – ekiim
    3 mins ago















up vote
0
down vote

favorite












Recently I accidentally whipped out a directory with important stuff, and now I'm starting to think about the best ways to have backups, a remote copy It's already in place but I was thinking, about



A scripts that replicates my directory structure in another directory, and makes hard links for all the files in the directory, so In case I delete something It still exists.



But my question here is,




  • Does git version control will still work?


  • Should I replicate the structure and make hard links for each file or hard links the the directories?

What I want is to be able to have a hard links to the same inodes, in some other place, so I don't harm the integrity of the files if I delete or something, the hard links should be updated with a cronjob, so I always have a pointer to them.



The concern is If git will respect the hardlinks?










share|improve this question























  • Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
    – Michael Homer
    1 hour ago










  • Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
    – Michael Homer
    1 hour ago










  • If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
    – sebasth
    24 mins ago










  • @MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
    – ekiim
    3 mins ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Recently I accidentally whipped out a directory with important stuff, and now I'm starting to think about the best ways to have backups, a remote copy It's already in place but I was thinking, about



A scripts that replicates my directory structure in another directory, and makes hard links for all the files in the directory, so In case I delete something It still exists.



But my question here is,




  • Does git version control will still work?


  • Should I replicate the structure and make hard links for each file or hard links the the directories?

What I want is to be able to have a hard links to the same inodes, in some other place, so I don't harm the integrity of the files if I delete or something, the hard links should be updated with a cronjob, so I always have a pointer to them.



The concern is If git will respect the hardlinks?










share|improve this question















Recently I accidentally whipped out a directory with important stuff, and now I'm starting to think about the best ways to have backups, a remote copy It's already in place but I was thinking, about



A scripts that replicates my directory structure in another directory, and makes hard links for all the files in the directory, so In case I delete something It still exists.



But my question here is,




  • Does git version control will still work?


  • Should I replicate the structure and make hard links for each file or hard links the the directories?

What I want is to be able to have a hard links to the same inodes, in some other place, so I don't harm the integrity of the files if I delete or something, the hard links should be updated with a cronjob, so I always have a pointer to them.



The concern is If git will respect the hardlinks?







backup hard-link






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 mins ago

























asked 2 hours ago









ekiim

12




12











  • Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
    – Michael Homer
    1 hour ago










  • Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
    – Michael Homer
    1 hour ago










  • If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
    – sebasth
    24 mins ago










  • @MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
    – ekiim
    3 mins ago

















  • Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
    – Michael Homer
    1 hour ago










  • Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
    – Michael Homer
    1 hour ago










  • If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
    – sebasth
    24 mins ago










  • @MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
    – ekiim
    3 mins ago
















Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
– Michael Homer
1 hour ago




Virtually no filesystems support hard links to directories so that's unlikely to be workable (HFS+ on macOS is basically the only one in common use, and even then you basically need to let Time Machine do it for you). It might help if you said what system you're using so people can see what's going to be viable.
– Michael Homer
1 hour ago












Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
– Michael Homer
1 hour ago




Could you also clarify what your use case is? It sounds like you're concerned about deleting a file from your work directories somewhere and want to make sure it doesn't actually go away when you do, because there's still a living hard link. Is that correct? In that case, note that most editing operations are going to break the hard link, so the copy will just be a snapshot of the point in time it was made and so not much better than a proper backup. If you're concerned about conserving backup space itself with hard links (i.e. incremental-ish backups), say so too. You can edit your post.
– Michael Homer
1 hour ago












If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
– sebasth
24 mins ago




If you are looking for snapshots and you are not using zfs/btrfs, you could check out rsnapshot.org .
– sebasth
24 mins ago












@MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
– ekiim
3 mins ago





@MichaelHomer, exactly that, I edited the question, but still I don't know If the git operations will respect the hardlinks.
– ekiim
3 mins ago
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476809%2fsome-questions-about-hard-links-and-backups%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476809%2fsome-questions-about-hard-links-and-backups%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?