Linux Ubuntu 18.04 Full Backup












7















How can I backup my whole system and be able to restore perfectly to where I was? I have installed some nice themes and customized quite a few things (graphically) and wouldn't want to repeat this process if I need to re-install.



I guess my question is, do I have to only backup the home folder or do I have to do the whole system root folder. Many topics have advised not to backup the root folder but has let me confused.



I have no problem installing Ubuntu from scratch again and importing my home folder, as long as it gives me everything back in terms of the UI and custom themes etc. I am not fussed about the actual data such as Documents, Videos etc. I have alternative methods for these via cloud based solutions. Also, I have some commands in fstab but not sure this is stored in the home directory as well?



My idea was to use rsync and use



sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* 
--exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/*
--exclude=/media/* --exclude="swapfile" --exclude="lost+found"
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs"
--exclude=".ecryptfs"


Then setup a cron to schedule this.



Can you help?










share|improve this question









New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

    – AlexP
    6 hours ago






  • 2





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

    – Martin Schröder
    4 hours ago
















7















How can I backup my whole system and be able to restore perfectly to where I was? I have installed some nice themes and customized quite a few things (graphically) and wouldn't want to repeat this process if I need to re-install.



I guess my question is, do I have to only backup the home folder or do I have to do the whole system root folder. Many topics have advised not to backup the root folder but has let me confused.



I have no problem installing Ubuntu from scratch again and importing my home folder, as long as it gives me everything back in terms of the UI and custom themes etc. I am not fussed about the actual data such as Documents, Videos etc. I have alternative methods for these via cloud based solutions. Also, I have some commands in fstab but not sure this is stored in the home directory as well?



My idea was to use rsync and use



sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* 
--exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/*
--exclude=/media/* --exclude="swapfile" --exclude="lost+found"
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs"
--exclude=".ecryptfs"


Then setup a cron to schedule this.



Can you help?










share|improve this question









New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

    – AlexP
    6 hours ago






  • 2





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

    – Martin Schröder
    4 hours ago














7












7








7








How can I backup my whole system and be able to restore perfectly to where I was? I have installed some nice themes and customized quite a few things (graphically) and wouldn't want to repeat this process if I need to re-install.



I guess my question is, do I have to only backup the home folder or do I have to do the whole system root folder. Many topics have advised not to backup the root folder but has let me confused.



I have no problem installing Ubuntu from scratch again and importing my home folder, as long as it gives me everything back in terms of the UI and custom themes etc. I am not fussed about the actual data such as Documents, Videos etc. I have alternative methods for these via cloud based solutions. Also, I have some commands in fstab but not sure this is stored in the home directory as well?



My idea was to use rsync and use



sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* 
--exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/*
--exclude=/media/* --exclude="swapfile" --exclude="lost+found"
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs"
--exclude=".ecryptfs"


Then setup a cron to schedule this.



Can you help?










share|improve this question









New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












How can I backup my whole system and be able to restore perfectly to where I was? I have installed some nice themes and customized quite a few things (graphically) and wouldn't want to repeat this process if I need to re-install.



I guess my question is, do I have to only backup the home folder or do I have to do the whole system root folder. Many topics have advised not to backup the root folder but has let me confused.



I have no problem installing Ubuntu from scratch again and importing my home folder, as long as it gives me everything back in terms of the UI and custom themes etc. I am not fussed about the actual data such as Documents, Videos etc. I have alternative methods for these via cloud based solutions. Also, I have some commands in fstab but not sure this is stored in the home directory as well?



My idea was to use rsync and use



sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* 
--exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/*
--exclude=/media/* --exclude="swapfile" --exclude="lost+found"
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs"
--exclude=".ecryptfs"


Then setup a cron to schedule this.



Can you help?







backup rsync






share|improve this question









New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









Braiam

52.3k20137223




52.3k20137223






New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 9 hours ago









Maverick32Maverick32

512




512




New contributor




Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Maverick32 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

    – AlexP
    6 hours ago






  • 2





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

    – Martin Schröder
    4 hours ago



















  • Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

    – AlexP
    6 hours ago






  • 2





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

    – Martin Schröder
    4 hours ago

















Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

– AlexP
6 hours ago





Download Clonezilla. Make a bootable medium with Clonezilla Live. Boot into Clonezilla Live. Take full backup. To restore the backup, boot into Clonezilla Live and restore.

– AlexP
6 hours ago




2




2





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

– Martin Schröder
4 hours ago





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

– Martin Schröder
4 hours ago










3 Answers
3






active

oldest

votes


















6














The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.



Backing them up would be meaningless or they might be even harmful.



If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.



However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.



For example, a



mount /dev/sda7 /mnt/root


will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.



The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.



Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.



This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.






share|improve this answer










New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

    – Maverick32
    7 hours ago











  • Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

    – Maverick32
    7 hours ago











  • @Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

    – peterh
    7 hours ago













  • @Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

    – peterh
    7 hours ago













  • Note for the postgres example, an inconsistent backup is solved with WAL archiving.

    – OrangeDog
    7 hours ago



















3














Clonezilla to the rescue. Atrocious console interface but gets the job done reliably.



Download image and make a bootable USB drive from https://clonezilla.org/



Boot Clonezilla from USB drive and back up your drive and/or partitions to USB drives or sticks for easy restore. Don't let the UX scare you, it really works.






share|improve this answer


























  • Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

    – Maverick32
    8 hours ago



















1














If you really want to have a backup of just your themes and customization, then you don't really need to make a backup of your whole system. You just need to make a backup of some of your dotfiles.



For example, the changes you made for your windows are in ~/.config/gtk-3.0/settings.ini file. Most of the programs that you install will have a configuration file in ~/.config directory, you just need to make a backup of those configuration files.






share|improve this answer
























  • This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

    – Maverick32
    8 hours 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
});


}
});






Maverick32 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124734%2flinux-ubuntu-18-04-full-backup%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.



Backing them up would be meaningless or they might be even harmful.



If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.



However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.



For example, a



mount /dev/sda7 /mnt/root


will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.



The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.



Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.



This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.






share|improve this answer










New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

    – Maverick32
    7 hours ago











  • Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

    – Maverick32
    7 hours ago











  • @Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

    – peterh
    7 hours ago













  • @Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

    – peterh
    7 hours ago













  • Note for the postgres example, an inconsistent backup is solved with WAL archiving.

    – OrangeDog
    7 hours ago
















6














The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.



Backing them up would be meaningless or they might be even harmful.



If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.



However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.



For example, a



mount /dev/sda7 /mnt/root


will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.



The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.



Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.



This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.






share|improve this answer










New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

    – Maverick32
    7 hours ago











  • Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

    – Maverick32
    7 hours ago











  • @Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

    – peterh
    7 hours ago













  • @Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

    – peterh
    7 hours ago













  • Note for the postgres example, an inconsistent backup is solved with WAL archiving.

    – OrangeDog
    7 hours ago














6












6








6







The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.



Backing them up would be meaningless or they might be even harmful.



If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.



However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.



For example, a



mount /dev/sda7 /mnt/root


will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.



The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.



Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.



This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.






share|improve this answer










New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.



Backing them up would be meaningless or they might be even harmful.



If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.



However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.



For example, a



mount /dev/sda7 /mnt/root


will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.



The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.



Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.



This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.







share|improve this answer










New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited 8 hours ago





















New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 8 hours ago









peterhpeterh

1635




1635




New contributor




peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






peterh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

    – Maverick32
    7 hours ago











  • Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

    – Maverick32
    7 hours ago











  • @Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

    – peterh
    7 hours ago













  • @Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

    – peterh
    7 hours ago













  • Note for the postgres example, an inconsistent backup is solved with WAL archiving.

    – OrangeDog
    7 hours ago



















  • Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

    – Maverick32
    7 hours ago











  • Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

    – Maverick32
    7 hours ago











  • @Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

    – peterh
    7 hours ago













  • @Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

    – peterh
    7 hours ago













  • Note for the postgres example, an inconsistent backup is solved with WAL archiving.

    – OrangeDog
    7 hours ago

















Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

– Maverick32
7 hours ago





Thank you for the much detailed response here!! I'm new to linux (from windows) and i'm not really looking to do any web dev or db work but value your response as it gives me a bigger scope on what could happen in the future. May i ask, what you would recommend for me? I really just want to keep my nice looking UI with the custom themes i have put on. Would backing up the whole home folder only suffice?

– Maverick32
7 hours ago













Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

– Maverick32
7 hours ago





Just to add, I'm looking to back this up to my NAS which has a ext4 filesystem. Your suggestion seems ideal by mounting the root dir and then using rsync. I'll give that a go :)

– Maverick32
7 hours ago













@Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

– peterh
7 hours ago







@Maverick32 Don't worry, rsync is pretty okay! Run it from cron and it will work. I use rsync for pro environments, too (with a litte bonus scripting). The important thing is, that you don't need to play with sub-mounts and sub-mounts on this way. Insert this /mnt/root thing into your fstab, and run the rsync tool from cron. If you set up a local mailing system, you will get your daily (weekly?) backup report log into your mailbox. So it will near a pro system.

– peterh
7 hours ago















@Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

– peterh
7 hours ago







@Maverick32 Your NAS doesn't need to use ext4, any unix-compliant fs will be okay (samba on linux is usable for w$es, too, but it is still uni-compliant). Check also your rsync flags, it should also copy hard links. I use rsync -vaH --delete src/ target/ which looks like an abbreviation of your rsync. If your NAS is Linux-based, it is using probably ext4.

– peterh
7 hours ago















Note for the postgres example, an inconsistent backup is solved with WAL archiving.

– OrangeDog
7 hours ago





Note for the postgres example, an inconsistent backup is solved with WAL archiving.

– OrangeDog
7 hours ago













3














Clonezilla to the rescue. Atrocious console interface but gets the job done reliably.



Download image and make a bootable USB drive from https://clonezilla.org/



Boot Clonezilla from USB drive and back up your drive and/or partitions to USB drives or sticks for easy restore. Don't let the UX scare you, it really works.






share|improve this answer


























  • Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

    – Maverick32
    8 hours ago
















3














Clonezilla to the rescue. Atrocious console interface but gets the job done reliably.



Download image and make a bootable USB drive from https://clonezilla.org/



Boot Clonezilla from USB drive and back up your drive and/or partitions to USB drives or sticks for easy restore. Don't let the UX scare you, it really works.






share|improve this answer


























  • Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

    – Maverick32
    8 hours ago














3












3








3







Clonezilla to the rescue. Atrocious console interface but gets the job done reliably.



Download image and make a bootable USB drive from https://clonezilla.org/



Boot Clonezilla from USB drive and back up your drive and/or partitions to USB drives or sticks for easy restore. Don't let the UX scare you, it really works.






share|improve this answer















Clonezilla to the rescue. Atrocious console interface but gets the job done reliably.



Download image and make a bootable USB drive from https://clonezilla.org/



Boot Clonezilla from USB drive and back up your drive and/or partitions to USB drives or sticks for easy restore. Don't let the UX scare you, it really works.







share|improve this answer














share|improve this answer



share|improve this answer








edited 13 mins ago

























answered 8 hours ago









zx81roadkillzx81roadkill

513




513













  • Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

    – Maverick32
    8 hours ago



















  • Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

    – Maverick32
    8 hours ago

















Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

– Maverick32
8 hours ago





Thank you, i' ve thought about this but i was thinking of a more automated way to backup to my NAS, possibly in an incremental way. However, i appreciate this very much.

– Maverick32
8 hours ago











1














If you really want to have a backup of just your themes and customization, then you don't really need to make a backup of your whole system. You just need to make a backup of some of your dotfiles.



For example, the changes you made for your windows are in ~/.config/gtk-3.0/settings.ini file. Most of the programs that you install will have a configuration file in ~/.config directory, you just need to make a backup of those configuration files.






share|improve this answer
























  • This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

    – Maverick32
    8 hours ago
















1














If you really want to have a backup of just your themes and customization, then you don't really need to make a backup of your whole system. You just need to make a backup of some of your dotfiles.



For example, the changes you made for your windows are in ~/.config/gtk-3.0/settings.ini file. Most of the programs that you install will have a configuration file in ~/.config directory, you just need to make a backup of those configuration files.






share|improve this answer
























  • This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

    – Maverick32
    8 hours ago














1












1








1







If you really want to have a backup of just your themes and customization, then you don't really need to make a backup of your whole system. You just need to make a backup of some of your dotfiles.



For example, the changes you made for your windows are in ~/.config/gtk-3.0/settings.ini file. Most of the programs that you install will have a configuration file in ~/.config directory, you just need to make a backup of those configuration files.






share|improve this answer













If you really want to have a backup of just your themes and customization, then you don't really need to make a backup of your whole system. You just need to make a backup of some of your dotfiles.



For example, the changes you made for your windows are in ~/.config/gtk-3.0/settings.ini file. Most of the programs that you install will have a configuration file in ~/.config directory, you just need to make a backup of those configuration files.







share|improve this answer












share|improve this answer



share|improve this answer










answered 8 hours ago









Nauman AfsarNauman Afsar

5017




5017













  • This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

    – Maverick32
    8 hours ago



















  • This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

    – Maverick32
    8 hours ago

















This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

– Maverick32
8 hours ago





This sounds great, although i would have no idea on what particular files i should be backing up for this purpose?

– Maverick32
8 hours ago










Maverick32 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Maverick32 is a new contributor. Be nice, and check out our Code of Conduct.













Maverick32 is a new contributor. Be nice, and check out our Code of Conduct.












Maverick32 is a new contributor. Be nice, and check out our Code of Conduct.
















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%2f1124734%2flinux-ubuntu-18-04-full-backup%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

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...