Virtual Server with no Snappoint function: How do I make a full-backup of the running system?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












So I'm currently experimenting with a couple of uni servers. All of them have no option of creating snappoints in the vSphere Client. So I'm left to search for a backup solution in case the experimenting makes everything kaput.



Seeing as that I'm a linux beginner, what options are there for me to make a full backup of the currently running Ubuntu 16.04 for emergency cases when everything goes kaput.



To clarify: I have ssh access, I have a terminal access with putty. I can log with Filezilla via sftp and see all the folders. I have root access.



root@xxx:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 18M 780M 3% /run
/dev/mapper/vcac--ubuntu16--vg-root 15G 1.9G 12G 14% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 472M 58M 391M 13% /boot
/dev/mapper/data-disc1 50G 33M 50G 1% /net/xxx/disc1
tmpfs 797M 0 797M 0% /run/user/0


To clarifiy, I want to do a backup of this output. Obviously not What's been mapped, but what is used.










share|improve this question























  • First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
    – vidarlo
    Mar 29 at 18:43










  • Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
    – Grumpy ol' Bear
    Mar 30 at 0:41










  • You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
    – vidarlo
    Mar 30 at 9:04










  • Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
    – Grumpy ol' Bear
    Mar 30 at 9:32















up vote
0
down vote

favorite












So I'm currently experimenting with a couple of uni servers. All of them have no option of creating snappoints in the vSphere Client. So I'm left to search for a backup solution in case the experimenting makes everything kaput.



Seeing as that I'm a linux beginner, what options are there for me to make a full backup of the currently running Ubuntu 16.04 for emergency cases when everything goes kaput.



To clarify: I have ssh access, I have a terminal access with putty. I can log with Filezilla via sftp and see all the folders. I have root access.



root@xxx:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 18M 780M 3% /run
/dev/mapper/vcac--ubuntu16--vg-root 15G 1.9G 12G 14% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 472M 58M 391M 13% /boot
/dev/mapper/data-disc1 50G 33M 50G 1% /net/xxx/disc1
tmpfs 797M 0 797M 0% /run/user/0


To clarifiy, I want to do a backup of this output. Obviously not What's been mapped, but what is used.










share|improve this question























  • First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
    – vidarlo
    Mar 29 at 18:43










  • Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
    – Grumpy ol' Bear
    Mar 30 at 0:41










  • You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
    – vidarlo
    Mar 30 at 9:04










  • Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
    – Grumpy ol' Bear
    Mar 30 at 9:32













up vote
0
down vote

favorite









up vote
0
down vote

favorite











So I'm currently experimenting with a couple of uni servers. All of them have no option of creating snappoints in the vSphere Client. So I'm left to search for a backup solution in case the experimenting makes everything kaput.



Seeing as that I'm a linux beginner, what options are there for me to make a full backup of the currently running Ubuntu 16.04 for emergency cases when everything goes kaput.



To clarify: I have ssh access, I have a terminal access with putty. I can log with Filezilla via sftp and see all the folders. I have root access.



root@xxx:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 18M 780M 3% /run
/dev/mapper/vcac--ubuntu16--vg-root 15G 1.9G 12G 14% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 472M 58M 391M 13% /boot
/dev/mapper/data-disc1 50G 33M 50G 1% /net/xxx/disc1
tmpfs 797M 0 797M 0% /run/user/0


To clarifiy, I want to do a backup of this output. Obviously not What's been mapped, but what is used.










share|improve this question















So I'm currently experimenting with a couple of uni servers. All of them have no option of creating snappoints in the vSphere Client. So I'm left to search for a backup solution in case the experimenting makes everything kaput.



Seeing as that I'm a linux beginner, what options are there for me to make a full backup of the currently running Ubuntu 16.04 for emergency cases when everything goes kaput.



To clarify: I have ssh access, I have a terminal access with putty. I can log with Filezilla via sftp and see all the folders. I have root access.



root@xxx:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 18M 780M 3% /run
/dev/mapper/vcac--ubuntu16--vg-root 15G 1.9G 12G 14% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 472M 58M 391M 13% /boot
/dev/mapper/data-disc1 50G 33M 50G 1% /net/xxx/disc1
tmpfs 797M 0 797M 0% /run/user/0


To clarifiy, I want to do a backup of this output. Obviously not What's been mapped, but what is used.







server virtualbox ssh backup sftp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 at 0:49

























asked Mar 29 at 17:53









Grumpy ol' Bear

127110




127110











  • First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
    – vidarlo
    Mar 29 at 18:43










  • Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
    – Grumpy ol' Bear
    Mar 30 at 0:41










  • You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
    – vidarlo
    Mar 30 at 9:04










  • Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
    – Grumpy ol' Bear
    Mar 30 at 9:32

















  • First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
    – vidarlo
    Mar 29 at 18:43










  • Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
    – Grumpy ol' Bear
    Mar 30 at 0:41










  • You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
    – vidarlo
    Mar 30 at 9:04










  • Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
    – Grumpy ol' Bear
    Mar 30 at 9:32
















First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
– vidarlo
Mar 29 at 18:43




First of all snapshots should not be used for backup, as they add some significant overhead over time, when a lot of changes have occured. Rather you should in some way make a export of the VM image from the hypervisor, either manually, or using a backup framework such as Veeam (free for homelab use). But this is not really a Ubuntu question, but rather a question for your hypervisor. I'd suggest asking it at Serverault.
– vidarlo
Mar 29 at 18:43












Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
– Grumpy ol' Bear
Mar 30 at 0:41




Again, no. Only way for me to make ANY backups is either SSH or SFTP. Anything else no can do. But I'll try Serverault.
– Grumpy ol' Bear
Mar 30 at 0:41












You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
– vidarlo
Mar 30 at 9:04




You can always do a image from within the instance, but if everything goes kaputski you have the problem of how to restore it. With VM's the answer is that you either make backups of configuration files that you've changed to allow easy manual recovery, or you take a VM level backup so that you simply can replace the VM in question when you need. There's no middle ground IMHO...
– vidarlo
Mar 30 at 9:04












Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
– Grumpy ol' Bear
Mar 30 at 9:32





Let's assume it never goes full kaputski, but with expirementing with sudo apt-get and changing config files and installing and uninstalling after all that I want to go back how it was at the beginning, having STILL access to ssh and sftp. What do I do? How do I do it?
– Grumpy ol' Bear
Mar 30 at 9:32











1 Answer
1






active

oldest

votes

















up vote
1
down vote













Make a backup of configuration files



You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:



ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2


Note that you should not restore all of it; you should restore the configuration files you have messed up.



Get list of installed packages



dpkg --get-selections > packagelist.txt


This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically



dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade


Additional apps



If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.



If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.



Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.






share|improve this answer




















  • Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
    – Grumpy ol' Bear
    Mar 30 at 13:16










  • You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
    – vidarlo
    Mar 30 at 14:43










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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f1020344%2fvirtual-server-with-no-snappoint-function-how-do-i-make-a-full-backup-of-the-ru%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Make a backup of configuration files



You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:



ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2


Note that you should not restore all of it; you should restore the configuration files you have messed up.



Get list of installed packages



dpkg --get-selections > packagelist.txt


This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically



dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade


Additional apps



If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.



If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.



Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.






share|improve this answer




















  • Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
    – Grumpy ol' Bear
    Mar 30 at 13:16










  • You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
    – vidarlo
    Mar 30 at 14:43














up vote
1
down vote













Make a backup of configuration files



You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:



ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2


Note that you should not restore all of it; you should restore the configuration files you have messed up.



Get list of installed packages



dpkg --get-selections > packagelist.txt


This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically



dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade


Additional apps



If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.



If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.



Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.






share|improve this answer




















  • Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
    – Grumpy ol' Bear
    Mar 30 at 13:16










  • You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
    – vidarlo
    Mar 30 at 14:43












up vote
1
down vote










up vote
1
down vote









Make a backup of configuration files



You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:



ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2


Note that you should not restore all of it; you should restore the configuration files you have messed up.



Get list of installed packages



dpkg --get-selections > packagelist.txt


This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically



dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade


Additional apps



If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.



If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.



Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.






share|improve this answer












Make a backup of configuration files



You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:



ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2


Note that you should not restore all of it; you should restore the configuration files you have messed up.



Get list of installed packages



dpkg --get-selections > packagelist.txt


This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically



dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade


Additional apps



If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.



If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.



Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 30 at 11:50









vidarlo

7,16342140




7,16342140











  • Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
    – Grumpy ol' Bear
    Mar 30 at 13:16










  • You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
    – vidarlo
    Mar 30 at 14:43
















  • Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
    – Grumpy ol' Bear
    Mar 30 at 13:16










  • You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
    – vidarlo
    Mar 30 at 14:43















Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
– Grumpy ol' Bear
Mar 30 at 13:16




Thank you, that's a start. But can't I just make a whole tarball or something from the df -h I posted above. Why, who, what's not importat. Is it possible to make and restore that way?
– Grumpy ol' Bear
Mar 30 at 13:16












You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
– vidarlo
Mar 30 at 14:43




You could make a tar ball of the whole system, but you would basically have no way of restoring it, and expecting it to work.
– vidarlo
Mar 30 at 14:43

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020344%2fvirtual-server-with-no-snappoint-function-how-do-i-make-a-full-backup-of-the-ru%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491