Answer the question
In order to leave comments, you need to log in
How to set up automatic copying of backups to a third-party FTP?
I use automysqlbackup, which stores dumps on the main server. The task is to configure the transfer of these backups to a third-party FTP. I used to use ISP Manager - this function is there by default, but recently I abandoned this panel. Installing a completely new panel like VestaCP will not work, because the server is already running, and installing this panel requires starting from scratch.
I'm looking for the easiest way to set up the overflow of backups by cron. In addition, FTP is not infinite, so old files must be deleted. Ideally, I would like some ready-made and free solution.
Answer the question
In order to leave comments, you need to log in
Just recently I was looking for a similar solution and settled on backupninja Able
to backup databases and files on a schedule and send them to a third-party server in various ways, including rsync, rdiff, duplicity
In /etc/backup.d/ create configs like 10-db.mysql , 50 -ftp.dup
The numbers at the beginning of the file describe the order of execution in case of simultaneous launch (first dump the database, and then upload from the folder with the archive to ftp).
The file extension indicates the task type (.mysql - mysql backup, .dup - use duplicity)
The default time for backups is set in /etc/backupninja.conf
...
when = everyday at 01:00
...
when = sundays at 02:00
when = 30th at 22
when = 30 at 22:00
when = everyday at 01 <-- the default
when = Tuesday at 05:00
when = hourly
## Переопределяем время выполнения
when = sundays at 02:00
## Параметры, передаваемые напрямую duplicity при запуске бэкапа
## --no-encryption позволяет отключить шифрование архивов с бэкапом и получить обычный .tar.gz
#options = --no-encryption
testconnect = no
tmpdir = /tmp
[source]
include = /var/backups/mysql
include = /home/user/projects/site1
exclude = /home/user/projects/.git
[gpg]
## Ключ для симметричного шифрования. Duplicity шифрует бэкапы с помощью gpg. Должен быть указан, даже если стоит --no-encryption, хоть и не будет использоваться
password = 123
[dest]
## perform incremental backups
incremental = yes
## days of incremental backups before doing full backup again
increments = 7
## how many days of data to keep
keep = 14
## for how many full backups do we keep their later increments
keepincroffulls = all
desturl = ftp://[email protected]_backup_server/
ftp_password = backup_user_password
Total number of contained volumes: 3
Type of backup set: Time: Num volumes:
Full Mon Apr 17 00:24:46 2017 1
Incremental Mon Apr 17 01:00:03 2017 1
Incremental Mon Apr 17 09:53:38 2017 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question