Skip to content

holydrug/backup-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script for backing up files (or creating a backup of your virtual machine) to Yandex.Disk

Example backup of a Minecraft server


backup-upload-service.sh

This script archives the specified directory into the designated folder.

For example:

/root/minecraft-modded

Will be archived into an archive named archive_2024-02-22T143025.zip It will save this backup in

/root/backups


backup-zipping-service.sh

Fill in the variables in the script:

  1. BACKUP_DIR: Path to the directory where backups are stored.
  2. LOG_FILE: Path to the log file where backup information is recorded.
  3. TOKEN: Authentication token for accessing Yandex.Disk.

You can recieve token here Yandex Rest API

  1. SERVERS_FOLDER: Folder containing server backups.
  2. DOMAIN_FOLDER: Path to the domain backup folder.
  3. YANDEX_FOLDER: Path to the folder on Yandex.Disk where backups will be stored (ENTIRE PATH).
  4. SPLIT_SIZE: Size of parts into which the ZIP archive will be split before sending to Yandex.Disk.

Note: Due to the limited upload speed of 128 kilobits per second on Yandex.Disk, it is necessary to split the files into smaller parts for efficient uploading.

Quotas and limits in API Gateway


Example of create daemon backup-upload-service:

sudo nano /etc/systemd/system/backup-upload-service.service

Edit service from file backup-upload-service.txt and paste it in command below

Example of start daemon backup-zipping-service:

sudo systemctl daemon-reload
sudo systemctl start backup-upload-service.service
sudo systemctl enable backup-upload-service.service

Example of create daemon backup-zipping-service:

sudo nano /etc/systemd/system/backup-zipping-service.service

Edit service from file backup-zipping-service.txt and paste it in command below

Example of start daemon backup-zipping-service:

sudo systemctl daemon-reload
sudo systemctl start backup-zipping-service.service
sudo systemctl enable backup-zipping-service.service

About

Shell backup job service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages