How to download/upload backup files?

reynierpm

New Member
May 19, 2023
28
1
3
I need to install new HDD disks on my server and add a RAID5 configuration which will be used later in Proxmox. I have a few VM running and I already create a backup of each. For the backup, I used STOP which is recommended, and ZSTD compression. I would like to copy those backups over my personal MacBookPro because I will need to create the RAID and that will erase everything, is that possible?
 
I need to install new HDD disks on my server and add a RAID5 configuration which will be used later in Proxmox. I have a few VM running and I already create a backup of each. For the backup, I used STOP which is recommended, and ZSTD compression. I would like to copy those backups over my personal MacBookPro because I will need to create the RAID and that will erase everything, is that possible?
Just copy the files with scp. Log via ssh into your machine, navigate to the place where they are and copy them to your machine.

If you've never done that, it may be a little tricky. Log into your machine and read your file /etc/pve/storage.cfg, here is a simple one:

Code:
root@proxmox ~ > cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup
        prune-backups keep-last=1
        shared 0

Now go to this directory:

Code:
root@proxmox ~ > cd /var/lib/vz/dump/

List the contents:

Code:
root@proxmox /var/lib/vz/dump > ls -l
total 854130
-rw-r--r-- 1 root root      2114 May 19 07:53 vzdump-qemu-102-2023_05_19-07_52_47.log
-rw-r--r-- 1 root root 873972876 May 19 07:53 vzdump-qemu-102-2023_05_19-07_52_47.vma.zst
-rw-r--r-- 1 root root        17 May 19 07:53 vzdump-qemu-102-2023_05_19-07_52_47.vma.zst.notes

Now you can copy the file from your machine (has to be executed from your machine):

Code:
scp proxmox:/var/lib/vz/dump/vzdump-qemu-102-2023_05_19-07_52_47.vma.zst .

You can also provide an asterisk instead of the file name to copy all files from your Proxmox host.
 
@LnxBil excellent answer! Is there any guide to set up SSH to Proxmox? I cannot find anyone. I tried using `ssh root@ip_address` but it does not allow me to connect, root seems to work only for UI :confused:

one more question:
> (has to be executed from your machine)

Does this mean "run the command from your MacBookPro"?
 
Last edited:
Also, what would be the process to restore this VM? By just copying the files back to it is original folder would be enough? Could not find any docs for this either :confused:
 
Also, what would be the process to restore this VM? By just copying the files back to it is original folder would be enough? Could not find any docs for this either
Yes, and then restore the VMs using the webUI by navigating to your "local" storages backups tab.
one more question:
> (has to be executed from your machine)

Does this mean "run the command from your MacBookPro"?
From the CLI of the PVE.
 
Does this mean "run the command from your MacBookPro"?
Yes, your MacBookPro. I wanted to just do everything from there so that you don't have to copy from one to another and vice versa.

I cannot find anyone. I tried using `ssh root@ip_address` but it does not allow me to connect, root seems to work only for UI :confused:
That's odd ... this is normally how it works. SSH is installed and available per default on PVE and AFAIK also password-enabled (which is normally not the case for e.g. Debian, where key-only for root).
 
Here is the content of my ssh_config file, does yours looks the same? I am running PVE 7.4-3

Code:
root@pve:~# cat /etc/ssh/ssh_config

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Include /etc/ssh/ssh_config.d/*.conf

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
 
When accessing your PVE from your MAC through SSH you probably want to have a look at "/etc/ssh/sshd_conf", which is for the SSH server, instead of the "/etc/ssh/ssh_conf" which is for the SSH client.
 
  • Like
Reactions: reynierpm
After a few headaches (I am using ZSH in MacOS and it does not like the
Code:
*
character) I found the right command:

Code:
~/proxmox_bck ❯ scp -r root@192.168.11.210:/var/lib/vz/dump/. .
root@192.168.11.210's password:
vzdump-qemu-101-2023_05_18-21_15_44.log                                                                                                              100% 1078   832.2KB/s   00:00
vzdump-qemu-103-2023_05_18-21_07_33.log                                                                                                              100% 3596     2.8MB/s   00:00
vzdump-qemu-103-2023_05_18-21_27_11.log                                                                                                              100% 5914     3.9MB/s   00:00
vzdump-qemu-101-2023_05_18-21_16_52.log                                                                                                              100% 9314     5.0MB/s   00:00
vzdump-qemu-101-2023_05_18-21_16_52.vma.zst                                                                                                          100% 6931MB 110.8MB/s   01:02
vzdump-qemu-101-2023_05_18-21_16_52.vma.zst.notes                                                                                                    100%    7     9.4KB/s   00:00
vzdump-qemu-103-2023_05_18-21_27_11.vma.zst.notes                                                                                                    100%   13    21.7KB/s   00:00
vzdump-qemu-103-2023_05_18-21_27_11.vma.zst                                                                                                           13% 1556MB 110.7MB/s   01:31 ETA

BTW, I was able to successfully access the PVE using SSH, and the root user I had no idea what was happening before. Anyway, thank you all for your help, will come back to this same thread if I have any issues restoring those backups.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!