Which files do I need to backup to keep my Linux user settings?











up vote
13
down vote

favorite
5












I need to accomplish a clean install after a bad graphics driver issue.



Which are the files I must backup to keep all users settings in Linux?



My distro is fuduntu.










share|improve this question




















  • 1




    I edited your question, if you are unhappy with the changes you can revert or edit again.
    – Baarn
    Jun 18 '12 at 19:01






  • 3




    Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
    – Baarn
    Jun 18 '12 at 19:03










  • I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
    – Yurij73
    Jun 18 '12 at 19:15








  • 1




    @Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
    – Linuxios
    Jun 19 '12 at 13:54

















up vote
13
down vote

favorite
5












I need to accomplish a clean install after a bad graphics driver issue.



Which are the files I must backup to keep all users settings in Linux?



My distro is fuduntu.










share|improve this question




















  • 1




    I edited your question, if you are unhappy with the changes you can revert or edit again.
    – Baarn
    Jun 18 '12 at 19:01






  • 3




    Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
    – Baarn
    Jun 18 '12 at 19:03










  • I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
    – Yurij73
    Jun 18 '12 at 19:15








  • 1




    @Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
    – Linuxios
    Jun 19 '12 at 13:54















up vote
13
down vote

favorite
5









up vote
13
down vote

favorite
5






5





I need to accomplish a clean install after a bad graphics driver issue.



Which are the files I must backup to keep all users settings in Linux?



My distro is fuduntu.










share|improve this question















I need to accomplish a clean install after a bad graphics driver issue.



Which are the files I must backup to keep all users settings in Linux?



My distro is fuduntu.







linux backup fedora






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 18 '12 at 19:03









slhck

158k47436461




158k47436461










asked Jun 18 '12 at 18:58









Yurij73

44011018




44011018








  • 1




    I edited your question, if you are unhappy with the changes you can revert or edit again.
    – Baarn
    Jun 18 '12 at 19:01






  • 3




    Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
    – Baarn
    Jun 18 '12 at 19:03










  • I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
    – Yurij73
    Jun 18 '12 at 19:15








  • 1




    @Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
    – Linuxios
    Jun 19 '12 at 13:54
















  • 1




    I edited your question, if you are unhappy with the changes you can revert or edit again.
    – Baarn
    Jun 18 '12 at 19:01






  • 3




    Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
    – Baarn
    Jun 18 '12 at 19:03










  • I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
    – Yurij73
    Jun 18 '12 at 19:15








  • 1




    @Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
    – Linuxios
    Jun 19 '12 at 13:54










1




1




I edited your question, if you are unhappy with the changes you can revert or edit again.
– Baarn
Jun 18 '12 at 19:01




I edited your question, if you are unhappy with the changes you can revert or edit again.
– Baarn
Jun 18 '12 at 19:01




3




3




Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
– Baarn
Jun 18 '12 at 19:03




Basically you need to backup your /home directory, but depending on your usage or installations it would help to backup /etc /usr and /var. But chances are that you copy a bad config file over to the fresh system. I'd recommend to fix the problem instead of doing a clean install.
– Baarn
Jun 18 '12 at 19:03












I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
– Yurij73
Jun 18 '12 at 19:15






I had tryed [code] yum history -undo <few last installs id> [code] but it didn't help me. Also boouting with different vga modes "vga=ask" is helpless. Just terminal is accesible. So i can rm or copy or made other files operations. It freeze in boot a graphical shell gnome.
– Yurij73
Jun 18 '12 at 19:15






1




1




@Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
– Linuxios
Jun 19 '12 at 13:54






@Yurij73: You can surround code with ` and ` (backquote) in comments and answers.
– Linuxios
Jun 19 '12 at 13:54












1 Answer
1






active

oldest

votes

















up vote
11
down vote













The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?



For the back up itself, I always copy the following:



/usr/local
/usr/share
/home
/var
/etc
/root


There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.



You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.



The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.



Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.



/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc






share|improve this answer



















  • 1




    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
    – DeveloperACE
    Nov 20 at 20:27











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f438450%2fwhich-files-do-i-need-to-backup-to-keep-my-linux-user-settings%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
11
down vote













The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?



For the back up itself, I always copy the following:



/usr/local
/usr/share
/home
/var
/etc
/root


There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.



You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.



The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.



Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.



/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc






share|improve this answer



















  • 1




    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
    – DeveloperACE
    Nov 20 at 20:27















up vote
11
down vote













The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?



For the back up itself, I always copy the following:



/usr/local
/usr/share
/home
/var
/etc
/root


There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.



You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.



The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.



Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.



/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc






share|improve this answer



















  • 1




    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
    – DeveloperACE
    Nov 20 at 20:27













up vote
11
down vote










up vote
11
down vote









The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?



For the back up itself, I always copy the following:



/usr/local
/usr/share
/home
/var
/etc
/root


There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.



You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.



The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.



Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.



/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc






share|improve this answer














The bare minimum would be to keep the user's own files within /home. Also, in order to know which files to keep from /etc it is beneficial to use a system like etckeeper that can track history of changes to /etc and who made them. IE - were they distribution changes, or changes that you made?



For the back up itself, I always copy the following:



/usr/local
/usr/share
/home
/var
/etc
/root


There are ways to back these up using Rsync to a separate area, using hardlinks so that additional space is not used on subsequent backups.



You can then restore /home/* as is, but you will want to pick specific files/folders as needed from /var and /etc. You will know if you need something specific from /usr/local, because most likely you will have put it there purposely.



The contents of /var and /usr/share can be tricky. Apache, mediawiki, wordpress, and various other services store data in either. You should know if you have any data stored in these by the configuration you did when you set up these services. If you don't run any 'server' or 'web' services, you may be safe not backing these up, but it's always wiser to backup than to wish you had backed up.



Unless you have hand-edited things in /etc you probably are safe with a clean config. If you do have hand-made-changes in /etc, it is best to port them over by hand so you know exactly what you are introducing to the clean system.



/opt may also be a directory of concern. It is usually created when installing software distributed with it's own installer from software outside of your distribution. Backing up this is an option, but you may want to re-install those packages - as they have configurations that require links back into /etc







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 21 at 3:32

























answered Jun 21 '12 at 0:54









glallen

1,7971022




1,7971022








  • 1




    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
    – DeveloperACE
    Nov 20 at 20:27














  • 1




    im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
    – DeveloperACE
    Nov 20 at 20:27








1




1




im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
– DeveloperACE
Nov 20 at 20:27




im assuming by /user you mean /home/[username], although it sounds like you were trying to say /usr and added a letter. migh want to edit to clarify this
– DeveloperACE
Nov 20 at 20:27


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f438450%2fwhich-files-do-i-need-to-backup-to-keep-my-linux-user-settings%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AnyDesk - Fatal Program Failure

How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

QoS: MAC-Priority for clients behind a repeater