[Solved] backup Linux system to Windows system

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
ZanyScum
Posts: 17
Joined: 2025-01-05 05:47
Has thanked: 2 times
Been thanked: 1 time

[Solved] backup Linux system to Windows system

#1 Post by ZanyScum »

  • My Linux servers do have small hard disks, I can not create an archive there.
  • Is there a way to zip while doing a scp from a Windows system?
  • Please keep in mind, I want to use scp (or other tools) on the Windows system and GET the data into an archive with kept rights and everything.
  • I do NOT want to scp from the Linux system to the Windows system.
Currently I am even thinking about creating a local virtual Linux machine large enough to just get everything there, create an archive and then get the archive out of the VM. But that sounds so sub-optimal, I thought I 'd ask here if there is a more direct way to solve this.
Last edited by ZanyScum on 2025-01-24 23:32, edited 1 time in total.

User avatar
ruwolf
Posts: 940
Joined: 2008-02-18 05:04
Location: Banovce nad Bebravou
Has thanked: 95 times
Been thanked: 74 times

Re: [Software] backup Linux system to Windows system

#2 Post by ruwolf »

I do not see any reason why it would not work.
There should be dozens of options:

User avatar
ZanyScum
Posts: 17
Joined: 2025-01-05 05:47
Has thanked: 2 times
Been thanked: 1 time

Re: [Software] backup Linux system to Windows system

#3 Post by ZanyScum »

These are some good ideas. Thank you. I'll try the one with WinSCP first because I have NO idea how to even start with the Windows Subsystem for Linux.

I am such a liar, while I wrote the above, I googled for Cygwin, liked the idea and just downloaded it. :-)
If I get somewhere, I'll probably tell here.

User avatar
ZanyScum
Posts: 17
Joined: 2025-01-05 05:47
Has thanked: 2 times
Been thanked: 1 time

Re: [Software] backup Linux system to Windows system

#4 Post by ZanyScum »

It worked, I think.
Here is what I did:

  • install Cygwin
  • find your home directory using the "Cygwin Terminal"

    Code: Select all

    cygpath -w ~
  • copy/link to the .ssh directory your config and your id_rsa files
  • test the backup with something small

    Code: Select all

    ssh YOUR-SERVER tar czf - -C / etc/ssl > `date +%FT%T`-YOUR-SERVER-TEST.tar.gz
  • do the real backup

    Code: Select all

    ssh YOUR-SERVER tar czf - -C / var/backup/daily.0 > `date +%FT%T`-YOUR-SERVER.tar.gz
Thank you man. Cygwin solved the problem so fast and simple... I like this solution :-)

(The tests were successful, the real backup is still running...wish me luck)

User avatar
ZanyScum
Posts: 17
Joined: 2025-01-05 05:47
Has thanked: 2 times
Been thanked: 1 time

Re: [Solved] backup Linux system to Windows system

#5 Post by ZanyScum »

It worked.

Post Reply