Announcement

Collapse
No announcement yet.

Need help learning how to backup/restore

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    source is my system drive
    destination is a removable drive to which I had previously backed files up to

    Comment


      #17
      Okay, so getting back to backup strategies:

      I have a fresh new install of 20.04 and NOTHING LOOKS RIGHT!!! ARRRG!

      Everything from my mouse cursors to my keyboard shortcuts are all wonky.

      Once I get my system back to a way that I like, how do I back all that stuff up so next time I can just push it all right back into a fresh system?

      Comment


        #18
        Well, to start with, have you tried a restore strategy, like copying back from the last backup your hidden folders/files in /home?

        Comment


          #19
          Originally posted by Don B. Cilly View Post
          Well, to start with, have you tried a restore strategy, like copying back from the last backup your hidden folders/files in /home?
          I am still a beginner with Linux and have no idea how to do what you just said.

          Which files are you talking about? And how would I go about preserving them?

          Comment


            #20
            Hidden files/folders are ones beginning with a dot. Like, .config
            If you don't see them, in Dolphin, View, Show hidden files. (or Ctrl+H).
            Actually, if you copy everything from your backup /home to your new one... it might take a while, but you would get pretty much everything back - after a reboot.

            Comment


              #21
              I've been tooling around a bit in the system and in my old notes and manual drag and drop backups. I even managed to restore Webstorm to its old state by simple drag and drop. So I now have slightly more than no idea what I want to do.

              I'm considering:
              create a folder and subfolders to act as a repository for config files and such that I want to keep that mimics the structure of my linux file system. Then put copies of what I want to keep in its respective place in that repo.
              Then write a script that copies each file into its desired final destination. Place that script at the root directory of the repo and when its time to re-install, just run that script and restore my settings.

              If I put stuff in there as I configure my system, it *should* go pretty smoothly.

              Or maybe just skip the folder mimicry and just keep a csv or json file of file names and paths. Something along those lines and recurse through the collection to put everything in its place.

              Does that sound doable? Or is there an easier way?

              Comment


                #22
                Webstorm is proprietary. Did its license locking give you any problems?

                "Mimicing" your Linux system? Why? That's what a good filesystem is for, and if you are running BTRFS then you're running the best. A single snapshot of /home (@home) will create an EXACT copy of your /home account. And, you can add several snapshots for any reason you want.
                Create a folder and subfolders to act as a repository for config files and such that I want to keep that mimics the structure of my linux file system. Then put copies of what I want to keep in its respective place in that repo.
                Then write a script that copies each file into its desired final destination. Place that script at the root directory of the repo and when its time to re-install, just run that script and restore my settings.
                That is a singularly bad idea. You don't want to mess with the structure of the system outside of /home/youraccount until you've gained a much broader knowledge of Linux than you have now. Your "repo" will turn out to be a manual disaster. "Re-installing" is better done by restoring from an appropriate BTRFS snapshot. It is a WHOLE LOT QUICKER as well. Seconds, literally.

                Install TimeShift and then point it to your external USB drive (or a second internal drive) and let it make backup snapshots, or manually trigger a snapshot for any reason you want. Want to experiment? Make a snapshot and then play away. Don't like how it turned out? Use TimeShift to roll back to the snapshot you took before yo started to experiment. Seconds later you're back in your system as it was before you began experimenting.

                A word or warning.
                Be careful of what you drag and where you drop it. I suggest you avoid overwriting any file whose name begins with a "period", like ".config", or ".cache", or ".mozilla". Those are system files which KDE or the apps you've installed write critical information in.
                Last edited by GreyGeek; Jun 10, 2021, 07:18 PM.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #23
                  I felt pretty safe dragging and dropping WebStorm. It works no matter where you install it. So I installed it then copied the old one and its config folder over the new one and its config folder. Now It works just like it used to. But I am glad you explained all that stuff about daemons. I didn't realize that happened in Linux. I thought I left that stuff behind with Windows.

                  The reason I was thinking of doing a mimic is because I don't want to necessarily copy my entire /home folder since that would copy things that maybe I don't want to keep anymore or even errors. And since one never knows exactly when an unknown error arose I think it's best to be as specific about what I keep as possible. I wouldn't want to copy an error back in. As you pointed out earlier, why would I copy my old corrupt /home back over a new one?

                  What I actually came up with is creating a data collection and recursing over it calling resync on each member of the collection till it reaches the last one, then exits. Then all I need to do add to the collection when I find something I want to keep.

                  Here's a rough idea:

                  Code:
                  recursive function(collection)
                   resync(collection[n].sourcePath, collection[n].destinationPath)
                  
                  [COLOR=#000080][B]var [/B][/COLOR][COLOR=#458383]collection [/COLOR]= [
                  {  [COLOR=#008000][B]"filename"[/B][/COLOR]: [COLOR=#008000][B]"some file"[/B][/COLOR],
                  [COLOR=#008000][B]"sourcePath"[/B][/COLOR]: [COLOR=#008000][B]"some/source/path"[/B][/COLOR],
                  [COLOR=#008000][B]"destinationPath:"[/B][/COLOR]: [COLOR=#008000][B]"some/destination/path"
                  [/B][/COLOR]},
                  {  [COLOR=#008000][B]"filename"[/B][/COLOR]: [COLOR=#008000][B]"some other file"[/B][/COLOR],
                  [COLOR=#008000][B]"sourcePath"[/B][/COLOR]: [COLOR=#008000][B]"some/other/source/path"[/B][/COLOR],
                  [COLOR=#008000][B]"destinationPath:"[/B][/COLOR]: [COLOR=#008000][B]"some/other/destination/path"
                  [/B][/COLOR][FONT=&amp]}
                  ][/FONT]

                  Comment


                    #24
                    Originally posted by TwoFistedJustice View Post
                    I felt pretty safe dragging and dropping WebStorm. It works no matter where you install it. So I installed it then copied the old one and its config folder over the new one and its config folder. Now It works just like it used to. But I am glad you explained all that stuff about daemons. I didn't realize that happened in Linux. I thought I left that stuff behind with Windows
                    Note every application is self-contained in its own directory. For some apps, some parts may be in /opt or /someotherfolder under root but the user's config and other files may be in the user's home account. Binary parts, the executables, may be in /usr/bin. Apps that come packaged in tar balls can install just in your home account or have components split between root and home. It just depends on what the developer decides.

                    Neither Windows nor Linux prevent the user from making foolish mistakes. It's like flying a plane. You are in control, for better or worse. Unlike Windows, with Linux you are given TOTAL control and Linux doesn't prevent you from doing something dangerous or stupid. What you copy and where you copy it can be safe or fatal. It's up to you. What ever you do, abandon your Windows thinking and learn to think in Linux.


                    Originally posted by TwoFistedJustice View Post
                    The reason I was thinking of doing a mimic is because I don't want to necessarily copy my entire /home folder since that would copy things that maybe I don't want to keep anymore or even errors. And since one never knows exactly when an unknown error arose I think it's best to be as specific about what I keep as possible. I wouldn't want to copy an error back in. As you pointed out earlier, why would I copy my old corrupt /home back over a new one?

                    What I actually came up with is creating a data collection and recursing over it calling resync on each member of the collection till it reaches the last one, then exits. Then all I need to do add to the collection when I find something I want to keep.

                    Here's a rough idea:

                    Code:
                    recursive function(collection)
                     resync(collection[n].sourcePath, collection[n].destinationPath)
                    
                    [COLOR=#000080][B]var [/B][/COLOR][COLOR=#458383]collection [/COLOR]= [
                    {  [COLOR=#008000][B]"filename"[/B][/COLOR]: [COLOR=#008000][B]"some file"[/B][/COLOR],
                    [COLOR=#008000][B]"sourcePath"[/B][/COLOR]: [COLOR=#008000][B]"some/source/path"[/B][/COLOR],
                    [COLOR=#008000][B]"destinationPath:"[/B][/COLOR]: [COLOR=#008000][B]"some/destination/path"
                    [/B][/COLOR]},
                    {  [COLOR=#008000][B]"filename"[/B][/COLOR]: [COLOR=#008000][B]"some other file"[/B][/COLOR],
                    [COLOR=#008000][B]"sourcePath"[/B][/COLOR]: [COLOR=#008000][B]"some/other/source/path"[/B][/COLOR],
                    [COLOR=#008000][B]"destinationPath:"[/B][/COLOR]: [COLOR=#008000][B]"some/other/destination/path"
                    [/B][/COLOR][FONT=&amp]}
                    ][/FONT]
                    What you want to keep or not keep changes as your opinion on what you need or don't need changes. If you don't want to copy something from your home folder into a "backup" then delete it before you do the backup. The BTRFS way is to make a snapshot of home BEFORE you delete a file you don't want. That way, if you change your mind you can retrieve the file from a previous snapshot. That's the advantage of learning your tools before you try to duplicate their functions.

                    Perhaps you might consider the version control system on your home account. Git is your tool, the best one in fact. I used to use git to "version" control my home files before BTRFS became available and would create a branch every time I changed my contents. I could always retrieve a file I deleted in one branch from a branch where the file still existed. Git GUI apps made managing the my local git repositories easy. However, since I began using BTRFS I've abandon those methods and use snapshots. Much easier, must faster, and a LOT cleaner!
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment

                    Working...
                    X