05-22-2020, 04:03 PM
This tutorial is made specially for HostLease vps holders and whats a backup for their servers
As we all know, there was some problems with HostLease Network which sadly lead to immediate end for the sponsorship and to backup your files you will need rescue mode enabled on your server, so at first make a topic in private vps support and admins will start it for you (they may change the root password to the default one that was in the vps request topic)
So at first you need to login with your ssh details but 22 port only will be available for ssh even if you disabled it and opened another port.
First step to do after logging in at rescue mode is to mount your disk space into rescue mode so get your disk info by using
Second step is to make a directory for the disk
This was how can you backup your files, to backup your MySQL database you can find them in /var/lib/mysql or the directory that contains MySQL my.cnf file you can download the folder of the mysql that you want and upload it to the another host/place when you need it.
Hope you liked the tutorial
I typed this in 5 minutes so if there is any grammar mistakes tell me in private and i will edit them, if anyone got edits/questions for this topic you can leave leave a reply
As we all know, there was some problems with HostLease Network which sadly lead to immediate end for the sponsorship and to backup your files you will need rescue mode enabled on your server, so at first make a topic in private vps support and admins will start it for you (they may change the root password to the default one that was in the vps request topic)
So at first you need to login with your ssh details but 22 port only will be available for ssh even if you disabled it and opened another port.
First step to do after logging in at rescue mode is to mount your disk space into rescue mode so get your disk info by using
root@rescue:~# fdisk -l
Disk /dev/vda: 704 MiB, 738197504 bytes, 1441792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2dd1bce6
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1435647 1433600 700M 83 Linux
Disk /dev/vdb: 75 GiB, 80530636800 bytes, 157286400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000b136f
Device Boot Start End Sectors Size Id Type
/dev/vdb1 * 2048 148897792 148895745 71G 83 Linux
/dev/vdb2 148897793 157286399 8388607 4G 82 Linux swap / Solaris
root@rescue:~#
So here my disk space was in /dev/vdb1 and thats thats probably with all usersDisk /dev/vda: 704 MiB, 738197504 bytes, 1441792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2dd1bce6
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1435647 1433600 700M 83 Linux
Disk /dev/vdb: 75 GiB, 80530636800 bytes, 157286400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000b136f
Device Boot Start End Sectors Size Id Type
/dev/vdb1 * 2048 148897792 148895745 71G 83 Linux
/dev/vdb2 148897793 157286399 8388607 4G 82 Linux swap / Solaris
root@rescue:~#
Second step is to make a directory for the disk
mkdir /backup
Third step to do is to mount the disk in that directorymount -t auto -o ro /dev/vdb1 /backup
Fourth step is to check if its mounted successfullyroot@rescue:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 672M 653M 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 793M 81M 713M 11% /run
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/vdb1 70G 8.4G 58G 13% /backup
root@rescue:~#
Fifth step is to login with the same info at filezilla/wincp and go to backup folder, it will give u access to all directories of the server.Filesystem Size Used Avail Use% Mounted on
/dev/vda1 672M 653M 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 793M 81M 713M 11% /run
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/vdb1 70G 8.4G 58G 13% /backup
root@rescue:~#
This was how can you backup your files, to backup your MySQL database you can find them in /var/lib/mysql or the directory that contains MySQL my.cnf file you can download the folder of the mysql that you want and upload it to the another host/place when you need it.
Hope you liked the tutorial
I typed this in 5 minutes so if there is any grammar mistakes tell me in private and i will edit them, if anyone got edits/questions for this topic you can leave leave a reply