Let me describe my problem first:
At work, we have an Ubuntu 14.04.1 LTS server which is obviously kinda outdated. I need to make a release upgrade and before that, there needs to be a backup.
We have a Windows 2012 Server which would have enough space to store the backup.
I googled and found a solution to keep the permissions, which would be lost if I just cp -a everything
:
dd if=/path/to/dir bs=1G | gzip > /path/to/backup/backup.tar.gz
So in that .tar.gz file, the permissions should be kept.
My idea was it to run the dd for every dir which I needed to backup:
/etc, /home, /var
Next step would be to create a package list to reinstall all the packages. Found a solution here: (it's german but I guess you understand what they do)
After that, I should have a directory /backup/
where all the .tar.gz
files and the package lists are. This dir I would copy to our Windows server and do the release-upgrade on the Ubuntu server. If the upgrade messes with the system I can easily restore everything if I run the dd with reversed if and of.
Now my question(s):
Did I miss anything (in general/directories
I need to restore the System/etc
)?
Is there a better way to do it?
I hope my English isn't too bad and thank you for your help.
do_release_upgrade
) or replace your OS, don’t mix them (using a package list for a different OS version, particular directory from the old version, etc.) unless the more straightforward methods fail. – Melebius Sep 24 '19 at 09:23dd
can be used to copy a file or a partition or a whole drive (cloning), but here I think you should usetar
(to get a 'tar.gzfile:
sudo tar -cvzf /path/to/backup/backup-of-dirx.tar.gz /path/to/dirx` – sudodus Sep 24 '19 at 09:28So the sudo tar is the better option? and run that for all my dirs to backup?
– Holger P. Sep 24 '19 at 09:33man tar
and you can find good tutorials abouttar
via the internet. – sudodus Sep 24 '19 at 10:14