SpaceCore WIKI
English
English
  • Personal Account and Registration
    • Account registration
    • «Customer» section
    • «Finance» section
    • Account Verification (KYC)
  • Customer service
    • How do I place an order?
    • How to contact support?
    • The Game Hosting panel
    • Setting Up BILLmanager 6 for Reselling
  • Communications
    • Notifications in Telegram
    • Web Hosting Notifications
    • Using a ping bot in Telegram
  • Information board
    • Blocked ports (VPS/VDS)
    • What is IOPS?
    • VAT for the EU and UK
  • VPS and Dedicated Servers
    • How to use VPS/VDS?
    • Changing the Password for VDS
  • OS and software configuration
    • Java [Linux]
    • Screen
    • Linux Password Recovery
    • Connecting via SSH keys
    • Disabling access to Linux using a password
    • Deploying MikroTik RouterOS on VDS
  • AI
    • Deploying DeepSeek on your server in just a few clicks
  • Windows
    • RDP connection
    • Configuring the RDP connection
    • Changing the password
    • Installation via QEMU
    • How to add an IPv4
    • Download files
    • Bruteforce Windows
  • Network Setup and Security
    • No interaction with private networks
    • Working with TCPDump
    • Change MTU Value
    • Configure IPTables
    • [DNS] Temporary failure resolving...
    • Network Speed Measurement [SpeedTest]
    • How do I buy a domain name?
    • How do I direct my domain to an IP address?
    • How to Protect Your Server? Basics of Cybersecurity
  • VPN and Privacy
    • WireGuard VPN [Easy]
    • OpenVPN [Easy]
    • Outline VPN Installation
    • Installing TorrServer
    • Installing 3X UI
    • Installing Marzban
    • Proxy for Specific Websites (V2RayN)
    • Use Nekoray
  • System monitoring
    • Traffic monitoring via VnStat
    • How to use the MTR tool
    • Getting Serial Numbers of Drives
  • Administration and Backups
    • Working with FTP Repository
    • Auto-shipment of backups
    • Installing an FTP Server
    • Mounting Linux Drives
  • Web development
    • Installing Apache2
    • Installing Nginx
    • Installing PHP
    • Installing MySQL
    • Installing PhpMyAdmin
    • Let's Encrypt SSL Generation
  • Minecraft
    • Installing Minecraft Java Server
    • Installing the Minecraft Bedrock/PE server
    • Installing the BungeeCord server
    • Installing Sponge Forge 1.12.2 Kernel
    • Configuring server.properties
    • Installing the icon on the server
    • Launch Options
    • Installing a resource pack on the server
  • Hetzner Servers
    • Control Panel
    • Password change via Rescue
    • Installing the operating system
  • 🇩🇪Contabo
    • The Control Panel
    • Disk space expansion
Powered by GitBook
On this page
  • FTP storage activation
  • Test shipment lftp
  • Automation via CRONTAB
PreviousWorking with FTP RepositoryNextInstalling an FTP Server

Last updated 11 months ago

Many users think about creating regular backups of their data, and this is great! But how do you automate backups?

In this article we will work with the service * External FTP-repository»

FTP storage activation

This service is available in the relevant section of . Choose «Dynamic tariff».

We specify the necessary amount of storage memory (up to 3.5Tb), for example, 50Gb, after which we add the tariff to the basket and pay.

A few seconds after payment service will be activated and visible in a special section.

We can get the data for working with it by selecting the service and clicking on the «Instructions» button.

In a separate window you will see a tab with all the necessary data to work.

Test shipment lftp

We will need lftp. Installing the utility on Debian/Ubuntu is done using the

sudo apt-get -y install lftp

Great! Let’s try to upload the test file, but create it prematurely using the touch command.

Yes. Enter the command to upload the file:

lftp ftp://login:pass@backup.s1.fsn.spacecore.pro:21 -e "set ftp:ssl-allow no; put -O / file; quit"

login — storage user name.

pass — storage password.

backup.s1.fsn.spacecore.pro — shipment server (do not need to change).

/ — the directory where the file will be uploaded to the repository.

file — the file name to be shipped.

For our service this command will be relevant, enter.

lftp ftp://spacecore35176:KDAcfR4p1tyz@backup.s1.fsn.spacecore.pro:21 -e "set ftp:ssl-allow no; put -O / spacecore; quit"

After the input connection to the remote server and the file shipment (the time of shipment varies depending on the size of the transmitted file and the speed of the network). At the end of the process, we can see our file by connecting to the repository via FTP.

But the question remains: «How can this process be automated?».

First, create a script that will perform all the necessary actions for us. Create a file and open the editor using the command

nano backup.sh

Where backup.sh is the file name

#!/bin/bash
lftp ftp://spacecore35176:KDAcfR4p1tyz@backup.s1.fsn.spacecore.pro:21 -e "set ftp:ssl-allow no; put -O /backups backup.tar.gz; quit"

Where #!/bin/bash — the necessary string indicating that it is the shell script in front of us.

/backups — a new directory for storing the uploaded file in the repository (which must be created on the FTP server itself).

backup.tar.gz — the new file name for the shipment is premature.

Optionally, before uploading a file, you can add commands to archive those important data that you need to save on a remote server.

We save our script file using a combination Ctrl + X -> y.

Now we are trying to ship the file using a Shell script (in our case, an archive is specified for shipment backup.tar.gz , so let's create it first). Then we use our script.

sh backup.sh

Shipment’s started. Waiting for completion of the process.

The script works! Our data archive has been successfully uploaded to a remote FTP server.

Automation via CRONTAB

More information about working with CRON can be found in the form of public articles on various websites.

Use the command to open the CRON configuration.

crontab -e

Done. Currently it is empty. In the form of comments, information from the developers on setting up automation.

Minute Hour Day Month Money Weeks /Way/To/File

Add this line to set the regular start of our download script every day at 00:00 server time.

0 0 * * * /root/backup.sh

Where /root/backup.sh is the path to the executable.

Great job! We created our own script for uploading the backup file, and also learned to automate this task via CRON.

Now we go to our main server from which files will be downloaded to FTP storage. We will need the article «».

Billing
Working with FTP-repository