Backing up dataWhat's a good back-up strategy for 1 desktop PC?Bash script to clone Ubuntu to new partition...

COUNT(*) or MAX(id) - which is faster?

Information to fellow intern about hiring?

Is domain driven design an anti-SQL pattern?

Does the average primeness of natural numbers tend to zero?

Can I find out the caloric content of bread by dehydrating it?

What is the meaning of "of trouble" in the following sentence?

Why was the "bread communication" in the arena of Catching Fire left out in the movie?

Is this food a bread or a loaf?

Why is my log file so massive? 22gb. I am running log backups

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Prime joint compound before latex paint?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Is every set a filtered colimit of finite sets?

How can I fix this gap between bookcases I made?

How can I add custom success page

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

extract characters between two commas?

How to move the player while also allowing forces to affect it

Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

What to wear for invited talk in Canada

How to make payment on the internet without leaving a money trail?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?



Backing up data


What's a good back-up strategy for 1 desktop PC?Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgradeBackup Linux configuration, scripts and documents to GmailRsync with crontab helpBacking up /home/userSteps to take before resizing partition to prevent damaging dataBackup programs and program data?Backing up 2 computersBacking up a HDD using ddcopying data and syncing new dataQuestions related to ubuntu and data storageBacking up to make space space for dual bootBacking up specific directory with it's content to remote locationHow to backup entire disk for Ubuntu Server quickly and easily






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I'm completely new to Ubuntu and I was warned that I should backup data. How do I do all of this? I don't any about this dd, partitions or stuff so I need some help.










share|improve this question




















  • 1





    Possible duplicate of What's a good back-up strategy for 1 desktop PC?

    – Charles Green
    1 hour ago











  • @CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

    – WinEunuuchs2Unix
    1 hour ago











  • @WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

    – Charles Green
    1 hour ago











  • @CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

    – WinEunuuchs2Unix
    1 hour ago




















1















I'm completely new to Ubuntu and I was warned that I should backup data. How do I do all of this? I don't any about this dd, partitions or stuff so I need some help.










share|improve this question




















  • 1





    Possible duplicate of What's a good back-up strategy for 1 desktop PC?

    – Charles Green
    1 hour ago











  • @CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

    – WinEunuuchs2Unix
    1 hour ago











  • @WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

    – Charles Green
    1 hour ago











  • @CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

    – WinEunuuchs2Unix
    1 hour ago
















1












1








1








I'm completely new to Ubuntu and I was warned that I should backup data. How do I do all of this? I don't any about this dd, partitions or stuff so I need some help.










share|improve this question
















I'm completely new to Ubuntu and I was warned that I should backup data. How do I do all of this? I don't any about this dd, partitions or stuff so I need some help.







partitioning backup dd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago







Michael Tarab

















asked 3 hours ago









Michael TarabMichael Tarab

112




112








  • 1





    Possible duplicate of What's a good back-up strategy for 1 desktop PC?

    – Charles Green
    1 hour ago











  • @CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

    – WinEunuuchs2Unix
    1 hour ago











  • @WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

    – Charles Green
    1 hour ago











  • @CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

    – WinEunuuchs2Unix
    1 hour ago
















  • 1





    Possible duplicate of What's a good back-up strategy for 1 desktop PC?

    – Charles Green
    1 hour ago











  • @CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

    – WinEunuuchs2Unix
    1 hour ago











  • @WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

    – Charles Green
    1 hour ago











  • @CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

    – WinEunuuchs2Unix
    1 hour ago










1




1





Possible duplicate of What's a good back-up strategy for 1 desktop PC?

– Charles Green
1 hour ago





Possible duplicate of What's a good back-up strategy for 1 desktop PC?

– Charles Green
1 hour ago













@CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

– WinEunuuchs2Unix
1 hour ago





@CharlesGreen Interesting duplicate candidate. Fabby wrote both the question and four answers all of which I've upvoted. It's almost a short story rather than a Q&A :D

– WinEunuuchs2Unix
1 hour ago













@WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

– Charles Green
1 hour ago





@WinEunuuchs2Unix "What to backup" is always a good question (IMO) and Fabby did seem to go the extra mile to produce scenarios

– Charles Green
1 hour ago













@CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

– WinEunuuchs2Unix
1 hour ago







@CharlesGreen I wonder if this OP is more interested to know he needs to backup ~/Documents? Then a hand-holding solution such as right click and copy it in Nautilus and then navigate to Thumb Drive and right click and paste it? In simple terms the question could be "How can I copy a data directory to a thumb drive?"

– WinEunuuchs2Unix
1 hour ago












2 Answers
2






active

oldest

votes


















0














Backing up all the programs would be 10 GB or more. It doesn't make much sense to back them up since they can be restored off the internet.



Backing up all your writings would be a couple MB. Unless you write very fast and frequently of course. Backing up your spreadsheets and presentations could be 100's of MBs if you have lots of clip art and images.



Backing up all your photos and songs could take dozens of GBs. An alternative would be to mirror the music and photos on your smartphone with Ubuntu. Chances are good a man made (fire, theft, vandalism, the ex) or an Act of God (lightning, flood, earthquake) will not effect both devices at the same time.



Backing up your videos could be 100's of GBs.



You have to know what you have, where it is stored, how big it is and whether or not it needs to be backed up. You will have to think about this and do some research.





For myself I used an automated backup to compressed file (< 25 MB) every morning that is emailed to my gmail.com account. Each morning cron only backs up what I've written along with configuration files of Ubuntu settings.



After a year now I'll have to adopt a Father-Son-Grandfather backup strategy for Yearly, Monthly, Weekly and Daily backups to prune the number of backups (365+ days) currently stored in gmail.com which is limited to 15 GB for free to everyone on planet Earth (or theoretically Mars if they have an IP address).



If you are interested in my daily backup to gmail.com script, you can see it here: Backup Linux configuration, scripts and documents to Gmail.





You can buy cheap 16 GB, 32 GB or 64 GB USB flash drives (aka thumb drives) and copy your whole Ubuntu image and data files to it.



If you have a 500 GB hard drive or SSD and Ubuntu only takes up 25 to 50 GB you can create a backup partition to store backups. Note these will not be offsite backups nor will they save you if your hard drive crashes. These backup partitions are helpful when you shoot yourself in the foot and delete a whole bunch of files or directories. To clone your Ubuntu partition to another backup partition I wrote this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade



Additionally there are backup programs you can use but I can't vouch for them.






share|improve this answer

































    0














    Be aware that when people tell you to make backups, there are two different kinds.





    One is for disaster recovery. If your computer is stolen or your house burns down, you need to have a copy of your data stored somewhere else so you can recover it onto the new hardware you're going to have to buy.



    For many people, making these full backups once a week or even once a month or so is enough. They are willing to take the chance on losing some data, but want to be sure they won't lose years of photographs.



    These backups don't have to be fast, nor do they have to be online. Rotating through two or three USB sticks, taking one home to make the copy and then leaving it at your workplace for safe keeping is easy. In case of disaster, it doesn't really matter if it takes a day or two to get the data back. What's important is that you can get it back.





    The other kind of backup is for occasional mistakes. If you are editing a file and mess it up, it's nice to be able to have a copy of what it looked like yesterday.



    Or perhaps you break something and don't notice it for a week or two. Comparing the program with what it looked like last month can be very useful.



    These kind of backups should be automatic, frequent, and easy to access. They don't need to be stored off site.





    For the second kind, I have a root crontab entry that uses "rsync --archive" to create backups that are very easy to access and use when I need them. I can use standard unix command-line tools to compare and restore different versions.



    rsync --archive --one-file-system --delete --backup 
    --backup-dir="../../$today/home"
    --exclude=".config/google-chrome/"
    --exclude=".cache/"
    --exclude=".local/share/zeitgeist/"
    --exclude="Downloads/"
    "/home/" "mostrecent/home/"


    A more detailed description of how I do this is already in an existing answer, but basically what it does is maintain a full copy of (most of) my home directories in one backup directory, and maintain copies of any files that were changed or deleted in other directories, each named by date. E.g.:



    -rw-r--r-- 1 ray ray 14452 Dec 26 18:43 mostrecent/home/ray/public/Log/wait.xhtml
    -rw-r--r-- 1 ray ray 14402 Dec 25 21:21 2018-12-26/home/ray/public/Log/wait.xhtml
    -rw-r--r-- 1 ray ray 14302 Dec 20 15:12 2018-12-25/home/ray/public/Log/wait.xhtml





    share|improve this answer
























    • rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

      – WinEunuuchs2Unix
      1 hour ago












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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',
    autoActivateHeartbeat: false,
    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%2faskubuntu.com%2fquestions%2f1132300%2fbacking-up-data%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Backing up all the programs would be 10 GB or more. It doesn't make much sense to back them up since they can be restored off the internet.



    Backing up all your writings would be a couple MB. Unless you write very fast and frequently of course. Backing up your spreadsheets and presentations could be 100's of MBs if you have lots of clip art and images.



    Backing up all your photos and songs could take dozens of GBs. An alternative would be to mirror the music and photos on your smartphone with Ubuntu. Chances are good a man made (fire, theft, vandalism, the ex) or an Act of God (lightning, flood, earthquake) will not effect both devices at the same time.



    Backing up your videos could be 100's of GBs.



    You have to know what you have, where it is stored, how big it is and whether or not it needs to be backed up. You will have to think about this and do some research.





    For myself I used an automated backup to compressed file (< 25 MB) every morning that is emailed to my gmail.com account. Each morning cron only backs up what I've written along with configuration files of Ubuntu settings.



    After a year now I'll have to adopt a Father-Son-Grandfather backup strategy for Yearly, Monthly, Weekly and Daily backups to prune the number of backups (365+ days) currently stored in gmail.com which is limited to 15 GB for free to everyone on planet Earth (or theoretically Mars if they have an IP address).



    If you are interested in my daily backup to gmail.com script, you can see it here: Backup Linux configuration, scripts and documents to Gmail.





    You can buy cheap 16 GB, 32 GB or 64 GB USB flash drives (aka thumb drives) and copy your whole Ubuntu image and data files to it.



    If you have a 500 GB hard drive or SSD and Ubuntu only takes up 25 to 50 GB you can create a backup partition to store backups. Note these will not be offsite backups nor will they save you if your hard drive crashes. These backup partitions are helpful when you shoot yourself in the foot and delete a whole bunch of files or directories. To clone your Ubuntu partition to another backup partition I wrote this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade



    Additionally there are backup programs you can use but I can't vouch for them.






    share|improve this answer






























      0














      Backing up all the programs would be 10 GB or more. It doesn't make much sense to back them up since they can be restored off the internet.



      Backing up all your writings would be a couple MB. Unless you write very fast and frequently of course. Backing up your spreadsheets and presentations could be 100's of MBs if you have lots of clip art and images.



      Backing up all your photos and songs could take dozens of GBs. An alternative would be to mirror the music and photos on your smartphone with Ubuntu. Chances are good a man made (fire, theft, vandalism, the ex) or an Act of God (lightning, flood, earthquake) will not effect both devices at the same time.



      Backing up your videos could be 100's of GBs.



      You have to know what you have, where it is stored, how big it is and whether or not it needs to be backed up. You will have to think about this and do some research.





      For myself I used an automated backup to compressed file (< 25 MB) every morning that is emailed to my gmail.com account. Each morning cron only backs up what I've written along with configuration files of Ubuntu settings.



      After a year now I'll have to adopt a Father-Son-Grandfather backup strategy for Yearly, Monthly, Weekly and Daily backups to prune the number of backups (365+ days) currently stored in gmail.com which is limited to 15 GB for free to everyone on planet Earth (or theoretically Mars if they have an IP address).



      If you are interested in my daily backup to gmail.com script, you can see it here: Backup Linux configuration, scripts and documents to Gmail.





      You can buy cheap 16 GB, 32 GB or 64 GB USB flash drives (aka thumb drives) and copy your whole Ubuntu image and data files to it.



      If you have a 500 GB hard drive or SSD and Ubuntu only takes up 25 to 50 GB you can create a backup partition to store backups. Note these will not be offsite backups nor will they save you if your hard drive crashes. These backup partitions are helpful when you shoot yourself in the foot and delete a whole bunch of files or directories. To clone your Ubuntu partition to another backup partition I wrote this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade



      Additionally there are backup programs you can use but I can't vouch for them.






      share|improve this answer




























        0












        0








        0







        Backing up all the programs would be 10 GB or more. It doesn't make much sense to back them up since they can be restored off the internet.



        Backing up all your writings would be a couple MB. Unless you write very fast and frequently of course. Backing up your spreadsheets and presentations could be 100's of MBs if you have lots of clip art and images.



        Backing up all your photos and songs could take dozens of GBs. An alternative would be to mirror the music and photos on your smartphone with Ubuntu. Chances are good a man made (fire, theft, vandalism, the ex) or an Act of God (lightning, flood, earthquake) will not effect both devices at the same time.



        Backing up your videos could be 100's of GBs.



        You have to know what you have, where it is stored, how big it is and whether or not it needs to be backed up. You will have to think about this and do some research.





        For myself I used an automated backup to compressed file (< 25 MB) every morning that is emailed to my gmail.com account. Each morning cron only backs up what I've written along with configuration files of Ubuntu settings.



        After a year now I'll have to adopt a Father-Son-Grandfather backup strategy for Yearly, Monthly, Weekly and Daily backups to prune the number of backups (365+ days) currently stored in gmail.com which is limited to 15 GB for free to everyone on planet Earth (or theoretically Mars if they have an IP address).



        If you are interested in my daily backup to gmail.com script, you can see it here: Backup Linux configuration, scripts and documents to Gmail.





        You can buy cheap 16 GB, 32 GB or 64 GB USB flash drives (aka thumb drives) and copy your whole Ubuntu image and data files to it.



        If you have a 500 GB hard drive or SSD and Ubuntu only takes up 25 to 50 GB you can create a backup partition to store backups. Note these will not be offsite backups nor will they save you if your hard drive crashes. These backup partitions are helpful when you shoot yourself in the foot and delete a whole bunch of files or directories. To clone your Ubuntu partition to another backup partition I wrote this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade



        Additionally there are backup programs you can use but I can't vouch for them.






        share|improve this answer















        Backing up all the programs would be 10 GB or more. It doesn't make much sense to back them up since they can be restored off the internet.



        Backing up all your writings would be a couple MB. Unless you write very fast and frequently of course. Backing up your spreadsheets and presentations could be 100's of MBs if you have lots of clip art and images.



        Backing up all your photos and songs could take dozens of GBs. An alternative would be to mirror the music and photos on your smartphone with Ubuntu. Chances are good a man made (fire, theft, vandalism, the ex) or an Act of God (lightning, flood, earthquake) will not effect both devices at the same time.



        Backing up your videos could be 100's of GBs.



        You have to know what you have, where it is stored, how big it is and whether or not it needs to be backed up. You will have to think about this and do some research.





        For myself I used an automated backup to compressed file (< 25 MB) every morning that is emailed to my gmail.com account. Each morning cron only backs up what I've written along with configuration files of Ubuntu settings.



        After a year now I'll have to adopt a Father-Son-Grandfather backup strategy for Yearly, Monthly, Weekly and Daily backups to prune the number of backups (365+ days) currently stored in gmail.com which is limited to 15 GB for free to everyone on planet Earth (or theoretically Mars if they have an IP address).



        If you are interested in my daily backup to gmail.com script, you can see it here: Backup Linux configuration, scripts and documents to Gmail.





        You can buy cheap 16 GB, 32 GB or 64 GB USB flash drives (aka thumb drives) and copy your whole Ubuntu image and data files to it.



        If you have a 500 GB hard drive or SSD and Ubuntu only takes up 25 to 50 GB you can create a backup partition to store backups. Note these will not be offsite backups nor will they save you if your hard drive crashes. These backup partitions are helpful when you shoot yourself in the foot and delete a whole bunch of files or directories. To clone your Ubuntu partition to another backup partition I wrote this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade



        Additionally there are backup programs you can use but I can't vouch for them.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago

























        answered 2 hours ago









        WinEunuuchs2UnixWinEunuuchs2Unix

        47.5k1192185




        47.5k1192185

























            0














            Be aware that when people tell you to make backups, there are two different kinds.





            One is for disaster recovery. If your computer is stolen or your house burns down, you need to have a copy of your data stored somewhere else so you can recover it onto the new hardware you're going to have to buy.



            For many people, making these full backups once a week or even once a month or so is enough. They are willing to take the chance on losing some data, but want to be sure they won't lose years of photographs.



            These backups don't have to be fast, nor do they have to be online. Rotating through two or three USB sticks, taking one home to make the copy and then leaving it at your workplace for safe keeping is easy. In case of disaster, it doesn't really matter if it takes a day or two to get the data back. What's important is that you can get it back.





            The other kind of backup is for occasional mistakes. If you are editing a file and mess it up, it's nice to be able to have a copy of what it looked like yesterday.



            Or perhaps you break something and don't notice it for a week or two. Comparing the program with what it looked like last month can be very useful.



            These kind of backups should be automatic, frequent, and easy to access. They don't need to be stored off site.





            For the second kind, I have a root crontab entry that uses "rsync --archive" to create backups that are very easy to access and use when I need them. I can use standard unix command-line tools to compare and restore different versions.



            rsync --archive --one-file-system --delete --backup 
            --backup-dir="../../$today/home"
            --exclude=".config/google-chrome/"
            --exclude=".cache/"
            --exclude=".local/share/zeitgeist/"
            --exclude="Downloads/"
            "/home/" "mostrecent/home/"


            A more detailed description of how I do this is already in an existing answer, but basically what it does is maintain a full copy of (most of) my home directories in one backup directory, and maintain copies of any files that were changed or deleted in other directories, each named by date. E.g.:



            -rw-r--r-- 1 ray ray 14452 Dec 26 18:43 mostrecent/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14402 Dec 25 21:21 2018-12-26/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14302 Dec 20 15:12 2018-12-25/home/ray/public/Log/wait.xhtml





            share|improve this answer
























            • rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

              – WinEunuuchs2Unix
              1 hour ago
















            0














            Be aware that when people tell you to make backups, there are two different kinds.





            One is for disaster recovery. If your computer is stolen or your house burns down, you need to have a copy of your data stored somewhere else so you can recover it onto the new hardware you're going to have to buy.



            For many people, making these full backups once a week or even once a month or so is enough. They are willing to take the chance on losing some data, but want to be sure they won't lose years of photographs.



            These backups don't have to be fast, nor do they have to be online. Rotating through two or three USB sticks, taking one home to make the copy and then leaving it at your workplace for safe keeping is easy. In case of disaster, it doesn't really matter if it takes a day or two to get the data back. What's important is that you can get it back.





            The other kind of backup is for occasional mistakes. If you are editing a file and mess it up, it's nice to be able to have a copy of what it looked like yesterday.



            Or perhaps you break something and don't notice it for a week or two. Comparing the program with what it looked like last month can be very useful.



            These kind of backups should be automatic, frequent, and easy to access. They don't need to be stored off site.





            For the second kind, I have a root crontab entry that uses "rsync --archive" to create backups that are very easy to access and use when I need them. I can use standard unix command-line tools to compare and restore different versions.



            rsync --archive --one-file-system --delete --backup 
            --backup-dir="../../$today/home"
            --exclude=".config/google-chrome/"
            --exclude=".cache/"
            --exclude=".local/share/zeitgeist/"
            --exclude="Downloads/"
            "/home/" "mostrecent/home/"


            A more detailed description of how I do this is already in an existing answer, but basically what it does is maintain a full copy of (most of) my home directories in one backup directory, and maintain copies of any files that were changed or deleted in other directories, each named by date. E.g.:



            -rw-r--r-- 1 ray ray 14452 Dec 26 18:43 mostrecent/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14402 Dec 25 21:21 2018-12-26/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14302 Dec 20 15:12 2018-12-25/home/ray/public/Log/wait.xhtml





            share|improve this answer
























            • rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

              – WinEunuuchs2Unix
              1 hour ago














            0












            0








            0







            Be aware that when people tell you to make backups, there are two different kinds.





            One is for disaster recovery. If your computer is stolen or your house burns down, you need to have a copy of your data stored somewhere else so you can recover it onto the new hardware you're going to have to buy.



            For many people, making these full backups once a week or even once a month or so is enough. They are willing to take the chance on losing some data, but want to be sure they won't lose years of photographs.



            These backups don't have to be fast, nor do they have to be online. Rotating through two or three USB sticks, taking one home to make the copy and then leaving it at your workplace for safe keeping is easy. In case of disaster, it doesn't really matter if it takes a day or two to get the data back. What's important is that you can get it back.





            The other kind of backup is for occasional mistakes. If you are editing a file and mess it up, it's nice to be able to have a copy of what it looked like yesterday.



            Or perhaps you break something and don't notice it for a week or two. Comparing the program with what it looked like last month can be very useful.



            These kind of backups should be automatic, frequent, and easy to access. They don't need to be stored off site.





            For the second kind, I have a root crontab entry that uses "rsync --archive" to create backups that are very easy to access and use when I need them. I can use standard unix command-line tools to compare and restore different versions.



            rsync --archive --one-file-system --delete --backup 
            --backup-dir="../../$today/home"
            --exclude=".config/google-chrome/"
            --exclude=".cache/"
            --exclude=".local/share/zeitgeist/"
            --exclude="Downloads/"
            "/home/" "mostrecent/home/"


            A more detailed description of how I do this is already in an existing answer, but basically what it does is maintain a full copy of (most of) my home directories in one backup directory, and maintain copies of any files that were changed or deleted in other directories, each named by date. E.g.:



            -rw-r--r-- 1 ray ray 14452 Dec 26 18:43 mostrecent/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14402 Dec 25 21:21 2018-12-26/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14302 Dec 20 15:12 2018-12-25/home/ray/public/Log/wait.xhtml





            share|improve this answer













            Be aware that when people tell you to make backups, there are two different kinds.





            One is for disaster recovery. If your computer is stolen or your house burns down, you need to have a copy of your data stored somewhere else so you can recover it onto the new hardware you're going to have to buy.



            For many people, making these full backups once a week or even once a month or so is enough. They are willing to take the chance on losing some data, but want to be sure they won't lose years of photographs.



            These backups don't have to be fast, nor do they have to be online. Rotating through two or three USB sticks, taking one home to make the copy and then leaving it at your workplace for safe keeping is easy. In case of disaster, it doesn't really matter if it takes a day or two to get the data back. What's important is that you can get it back.





            The other kind of backup is for occasional mistakes. If you are editing a file and mess it up, it's nice to be able to have a copy of what it looked like yesterday.



            Or perhaps you break something and don't notice it for a week or two. Comparing the program with what it looked like last month can be very useful.



            These kind of backups should be automatic, frequent, and easy to access. They don't need to be stored off site.





            For the second kind, I have a root crontab entry that uses "rsync --archive" to create backups that are very easy to access and use when I need them. I can use standard unix command-line tools to compare and restore different versions.



            rsync --archive --one-file-system --delete --backup 
            --backup-dir="../../$today/home"
            --exclude=".config/google-chrome/"
            --exclude=".cache/"
            --exclude=".local/share/zeitgeist/"
            --exclude="Downloads/"
            "/home/" "mostrecent/home/"


            A more detailed description of how I do this is already in an existing answer, but basically what it does is maintain a full copy of (most of) my home directories in one backup directory, and maintain copies of any files that were changed or deleted in other directories, each named by date. E.g.:



            -rw-r--r-- 1 ray ray 14452 Dec 26 18:43 mostrecent/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14402 Dec 25 21:21 2018-12-26/home/ray/public/Log/wait.xhtml
            -rw-r--r-- 1 ray ray 14302 Dec 20 15:12 2018-12-25/home/ray/public/Log/wait.xhtml






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 1 hour ago









            Ray ButterworthRay Butterworth

            12518




            12518













            • rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

              – WinEunuuchs2Unix
              1 hour ago



















            • rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

              – WinEunuuchs2Unix
              1 hour ago

















            rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

            – WinEunuuchs2Unix
            1 hour ago





            rsync is in my clone Ubuntu script mentioned in my answer. The OP's question might be closed as a duplicate so you might want to check back and post your answer on the possible duplicate. I'm about to do that myself.

            – WinEunuuchs2Unix
            1 hour ago


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1132300%2fbacking-up-data%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

            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

            Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...