S
S
Solli862015-04-22 08:54:28
linux
Solli86, 2015-04-22 08:54:28

How to set up ftp backup rotation in bash?

There is a need to merge database backups via ftp.
I found a simple solution , but it does not, in theory, rotate copies.
Task:
Use cron to set up backup with removal of obsolete copies according to the condition (for example, not older than two days).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Solli86, 2015-04-22
@Solli86

pr0l @pr0l
I wrote a bash script for myself a long time ago, rsync can do a lot if you read the mana

does rsync understand FTP?

M
mars natsuhiboshi, 2015-04-23
@mars_unique

Use perl, half an hour to think about / build a script and 20 minutes to run in, don't waste your nerves and time.

M
mureevms, 2015-04-24
@mureevms

1. Mount the FTP resource as a local file system help.ubuntu.ru/wiki/%D0%BC%D0%BE%D0%BD%D1%82%D0%B8...
2. Make a backup and put it in p. one. There are many options, for sure you already have a solution.
3. Add one line to the backup script to delete old copies: notessysadmin.com/poisk-fajlov-po-vozrastu

A
Andrew, 2015-05-08
@caa888

on the database server, make scheduled archives (cron) with saving the archive in the directory, then a script is launched that connects to the server via ftp and looks at the files, then they are checked by condition. depending on this, they are either deleted, or the current archive is simply filled.
all.
If you want, I can explain in more detail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question