Backup from CentOS 8 to Windows 11

Issues related to applications and software problems and general support
Post Reply
TheMidnighter
Posts: 4
Joined: 2023/11/28 17:33:30

Backup from CentOS 8 to Windows 11

Post by TheMidnighter » 2023/11/28 17:38:52

Hi team,

I did a thing. I bricked my CentOS 7 installation by trying to go to 8. Long story short, I need to stick with 7.
Now, I realize I'm going to have to re-install 7 but I am trying to maintain my files/directories because I am using this as web server, and I don't want to lose all of my web pages / data.

I am trying to back up my server onto my Windows 11 machine, I was thinking rsync would be the best but I am running in an issue:
I'm trying to mount the remote drive, but I receive this error whenever I do:

mount: unknown filesystem type 'cifs'
mount -t cifs //192.168.0.1/C_DRIVE -o user=account,password=secret /mnt/test

I googled it, someone said to try:
sudo modprobe cifs

that did not correct the problem, though. They also said try:
apt-get install cifs-utils
/usr/local/bin/apt-get: line 36: yum: command not found
Next time you may want to use: yum install cifs-utils

-bash: yum: command not found

So, I tried to install Yum -
dnf install yum
No match for argument: yum
Error: Unable to find a match: yum

I'm beyond lost. I just need to mount a remote drive, what am I doing wrong? :(

Thanks for your help.

User avatar
TrevorH
Site Admin
Posts: 33262
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Backup from CentOS 8 to Windows 11

Post by TrevorH » 2023/11/28 20:22:40

Sticking with CentOS 7 is not a long term solution. It only has 7 months of life left before it hits the end of the road so moving to a newer distro is definitely your best bet since you'll need to do it sooner or later anyway.

Given that you appear not to have yum or dnf, there isn't going to be much you can do to install anything so I would recommend finding an external disk or a large USB stick and backing up to that.

What is the problem with 8 and why do you want to go back to 7?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

TheMidnighter
Posts: 4
Joined: 2023/11/28 17:33:30

Re: Backup from CentOS 8 to Windows 11

Post by TheMidnighter » 2023/11/28 23:21:09

TrevorH wrote:
2023/11/28 20:22:40
Sticking with CentOS 7 is not a long term solution. It only has 7 months of life left before it hits the end of the road so moving to a newer distro is definitely your best bet since you'll need to do it sooner or later anyway.

Given that you appear not to have yum or dnf, there isn't going to be much you can do to install anything so I would recommend finding an external disk or a large USB stick and backing up to that.

What is the problem with 8 and why do you want to go back to 7?
I do have DNF... but it doesn't seem to work for most packages.
I get errors like:
root@greenpassion ~]# dnf install samba
cPanel Addons Production Feed 0.0 B/s | 0 B 00:00
cPanel Plugins project 0.0 B/s | 0 B 00:00
EA4 ( EasyApache 4 ) 0.0 B/s | 0 B 00:00
Extra Packages for Enterprise Linux 8 - x86_64 0.0 B/s | 0 B 00:00
WP Toolkit third parties 0.0 B/s | 0 B 00:00
CentOS Stream 8 - BaseOS 0.0 B/s | 0 B 00:00
WP Toolkit for cPanel 0.0 B/s | 0 B 00:00
Webtatic Repository EL7 - x86_64 0.0 B/s | 0 B 00:00
MySQL 5.7 Community Server 0.0 B/s | 0 B 00:00
CentOS Stream 8 - AppStream 0.0 B/s | 0 B 00:00
MySQL Tools Community 0.0 B/s | 0 B 00:00
Yarn Repository 0.0 B/s | 0 B 00:00
CentOS Stream 8 - Extras 0.0 B/s | 0 B 00:00
MySQL Connectors Community 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo 'cpanel-addons-production-feed', ignoring this repo.
Failed to synchronize cache for repo 'cpanel-plugins', ignoring this repo.
Failed to synchronize cache for repo 'baseos', ignoring this repo.
Failed to synchronize cache for repo 'appstream', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
No match for argument: samba
Error: Unable to find a match: samba
quite often.

I am using 7 because that is what my VPS host requires I use in order to use cPanel. I did not know this until I tried to start updating the OS

Thank you for the reply

User avatar
jlehtone
Posts: 4548
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Backup from CentOS 8 to Windows 11

Post by jlehtone » 2023/11/29 07:52:45

TheMidnighter wrote:
2023/11/28 17:38:52
I bricked my CentOS 7 installation by trying to go to 8. Long story short, I need to stick with 7.
Now, I realize I'm going to have to re-install 7 but I am trying to maintain my files/directories because I am using this as web server, and I don't want to lose all of my web pages / data.

I am trying to back up my server onto my Windows 11 machine, I was thinking rsync would be the best but I am running in an issue:
I'm trying to mount the remote drive
First, in-place conversion of one distro into different distro is not quite supported. (Red Hat has something for RHEL X->Y that works for only some systems, and AlmaLinux project has ELevate that is based on the RHEL tool -- i.e. does work for only some systems.) You seem to have cPanel, so you did not effectively have CentOS 7 to begin with.

Second, you surely made backups before the attempt? If you did, then only the changes -- new data since that backup -- is at risk.

The rsync is a convenient tool and it can copy over network -- without a mount of any kind. However, rather than push form Linux to Windows, one would probably run the rsync in the Windows and pull data from Linux.

The rsync is a convenient tool because it can copy all attributes of files and thus ensure that the copy is complete. Alas, filesystems like NTFS, FAT, CIFS do not support the same set of attributes as filesystems in Linux. Copying the files as is not an ideal backup.

Do you have free space in the server? You could/should create one (or more) package(s) and copy those. There probably is program 'tar' for creating a "tarball" file as copy of a directory (tree). Those couple files you could copy even with sftp or whatever you use with cPanel. Windows can definitely have such file transfer clients (in addition to rsync).

You don't need copy of whole system, just the data and config of the web server.
Does it store data in SQL server? One can dump database from SQL into file and copy that. One should not backup SQL by copy of files that uses anyway.

User avatar
TrevorH
Site Admin
Posts: 33262
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Backup from CentOS 8 to Windows 11

Post by TrevorH » 2023/11/29 10:22:37

I'm pretty sure that webtaqtic has been unmaintained for years so if you were using that for newer php etc, you're probably vulnerable to any security problems discovered since it died.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

TheMidnighter
Posts: 4
Joined: 2023/11/28 17:33:30

Re: Backup from CentOS 8 to Windows 11

Post by TheMidnighter » 2023/11/29 15:22:07

jlehtone wrote:
2023/11/29 07:52:45
TheMidnighter wrote:
2023/11/28 17:38:52
I bricked my CentOS 7 installation by trying to go to 8. Long story short, I need to stick with 7.
Now, I realize I'm going to have to re-install 7 but I am trying to maintain my files/directories because I am using this as web server, and I don't want to lose all of my web pages / data.

I am trying to back up my server onto my Windows 11 machine, I was thinking rsync would be the best but I am running in an issue:
I'm trying to mount the remote drive
First, in-place conversion of one distro into different distro is not quite supported. (Red Hat has something for RHEL X->Y that works for only some systems, and AlmaLinux project has ELevate that is based on the RHEL tool -- i.e. does work for only some systems.) You seem to have cPanel, so you did not effectively have CentOS 7 to begin with.

Second, you surely made backups before the attempt? If you did, then only the changes -- new data since that backup -- is at risk.

The rsync is a convenient tool and it can copy over network -- without a mount of any kind. However, rather than push form Linux to Windows, one would probably run the rsync in the Windows and pull data from Linux.

The rsync is a convenient tool because it can copy all attributes of files and thus ensure that the copy is complete. Alas, filesystems like NTFS, FAT, CIFS do not support the same set of attributes as filesystems in Linux. Copying the files as is not an ideal backup.

Do you have free space in the server? You could/should create one (or more) package(s) and copy those. There probably is program 'tar' for creating a "tarball" file as copy of a directory (tree). Those couple files you could copy even with sftp or whatever you use with cPanel. Windows can definitely have such file transfer clients (in addition to rsync).

You don't need copy of whole system, just the data and config of the web server.
Does it store data in SQL server? One can dump database from SQL into file and copy that. One should not backup SQL by copy of files that uses anyway.
My backups have been effected by this; they were supposed to be in a simple Backup folder but they seem to be missing. I am unsure if something in the update did that, or what.. I do not have much free space on the server. Which is why I was thinking I'd backup to my Windows machine - but I am just unsure how to do that without mounting a drive. I've googled around, maybe I'm looking at improper resources.

I know Windows can transfer files, I can connect to my terminal on my VPS - I cannot for the life of me figure out how to get my files from the CentOS to Windows.. I tried installing sshd (cgywin) on Windows but that only allowed me to connect to the linux machine, which without mounting a drive - I do not know how else to accomplish this

tunk
Posts: 1214
Joined: 2017/02/22 15:08:17

Re: Backup from CentOS 8 to Windows 11

Post by tunk » 2023/11/29 19:08:17

You could try wincsp or filezilla.

User avatar
TrevorH
Site Admin
Posts: 33262
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Backup from CentOS 8 to Windows 11

Post by TrevorH » 2023/11/29 19:37:03

I'd also note that cpaznel supports both el8 and el9 though perhaps not Stream as that's a permanent beta. There are other rebuilds of RHEL 8 and 9 available since Red Hat killed CentOS. That doesn't help you with getting your data off but if you have ssh access then you should be able to copy from it to your windows machine without needing an ssh daemon on the Windows side. If you install some WSL distro on Windows then that should have an ssh client package and that will include scp/sftp so you should be able to e.g.

scp -pr yourlinuxhost:/sourcedir /windowslocaldir/
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

TheMidnighter
Posts: 4
Joined: 2023/11/28 17:33:30

Re: Backup from CentOS 8 to Windows 11

Post by TheMidnighter » 2023/11/29 20:12:38

This was resolved by using Putty + pscp on Windows with the command: pscp - P 22 username@host.com:/public_html/backup.tar c:\users\public\dl

Post Reply