- In this guide, you are working with the Proxmox installation, in case of an error, data loss can occur. The author of this guide bears no responsibility for data loss and other problems caused.
- Be aware that by installing FTP servers you can cause system vulnerability if you do not follow security rules. Set very strong passwords and make sure that FTP is not accessible from the internet.
- Go to Proxmox VE.
- In the
Datacenter
, selectStorage
and chooseAdd
->Directory
. - Set
ID
tobackup
andDirectory
to the path where backups will be stored. For example/media/drive/
. - In
Content
, selectDisk Image
andVZDump Backup File
and clickOK
.
- Go to the
Backup
tab, click onAdd
. - For
Storage
, select the name of your disk (e.g.,backup
) and choose the backup time and machines to be backed up. - In
Retention
tab, setKeep Last
to the desired number of backups that will be kept on Proxmox.
- Connect to Proxmox (bare metal) via SSH or through the service in Proxmox.
- Update the package list:
apt-get update
- Install vsftpd:
apt-get install vsftpd
- Go to the configuration file:
nano /etc/vsftpd.conf
. Instead of nano, you can use another text editor. - Set the configuration according to the following example. If the line does not exist, add it. If it exists, uncomment it and modify it if needed.
anonymous_enable=NO
local_enable=YES
write_enable=NO
chroot_local_user=YES
allow_writeable_chroot=YES
local_root=/media/drive/dump #!adjust the path according to your settings and add /dump at the end
user_sub_token=$USER
- Create a new user who will have access to backups:
useradd -d /media/drive/dump ftpuser
. Instead offtpuser
, you can use a different name. - Set a password for the new user:
passwd ftpuser
. Use a strong password. - Restart vsftpd:
service vsftpd restart
. - Test the connection to the FTP server using an FTP client (e.g., Total Commander) and the new user credentials.
-
Create a new virtual machine that will take care of backup synchronization.
-
Update the package list:
sudo apt-get update
. -
Install PHP:
sudo apt-get install php-cli
. -
Install the library for sqlite:
sudo apt-get install php-sqlite3
. -
Create a folder and place the files of this repository in it.
-
You can learn how to setup and use this tool in the file
USAGE.md
.
- Install cron if you don’t have it:
sudo apt-get install cron
. - Enter the command:
crontab -e
. - Set cron to run after backup (for example, if Proxmox backup takes place every Sunday at 3:00, set cron on Sunday at 6:00). Example of cron:
0 6 * * 0 php /var/www/proxmox-ftp-syncer/syncer.php autorun
- Save the file and exit the editor.