Backing up data
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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
add a comment |
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
3
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days 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
2 days 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
2 days 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
2 days ago
add a comment |
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
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
partitioning backup dd
edited 2 days ago
Michael Tarab
asked 2 days ago
Michael TarabMichael Tarab
112
112
3
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days 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
2 days 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
2 days 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
2 days ago
add a comment |
3
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days 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
2 days 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
2 days 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
2 days ago
3
3
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days ago
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days 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
2 days 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
2 days 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
2 days 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
2 days 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
2 days 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
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
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.
Thanks for the tip. :-)
– Fabby
yesterday
add a comment |
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
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
2 days ago
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Thanks for the tip. :-)
– Fabby
yesterday
add a comment |
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.
Thanks for the tip. :-)
– Fabby
yesterday
add a comment |
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.
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.
edited 2 days ago
answered 2 days ago
WinEunuuchs2UnixWinEunuuchs2Unix
47.6k1192185
47.6k1192185
Thanks for the tip. :-)
– Fabby
yesterday
add a comment |
Thanks for the tip. :-)
– Fabby
yesterday
Thanks for the tip. :-)
– Fabby
yesterday
Thanks for the tip. :-)
– Fabby
yesterday
add a comment |
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
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
2 days ago
add a comment |
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
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
2 days ago
add a comment |
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
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
answered 2 days 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
2 days ago
add a comment |
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
2 days 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
2 days 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
2 days ago
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
3
Possible duplicate of What's a good back-up strategy for 1 desktop PC?
– Charles Green
2 days 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
2 days 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
2 days 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
2 days ago