I
I
Igor2020-05-22 09:48:57
Backup
Igor, 2020-05-22 09:48:57

How to upload backups correctly?

Good day, today I had to upload separate directories to a server.
There is: a backup server (debian) backups come to it with the help of (rsync)
There is a: server - a fight to which it was necessary to send separate directories that are already on the backup server, BUT before that, delete the old directories.
What I've done?
I go through winscp to the backup server, from there I copy the directories to the fight - server (to a separate directory)
Then, I go to ssh - the client to the server - fight and do something like

rm -r /var/www/wsx/administrator/manifests && cp -r /var/backup2105/administrator/manifests/ /var/www/wsx/administrator/

Thus, I just backed up a separate directory.
The question is, how could I deploy this much easier?
Available: ssh access, rsync, winscp. Thank you in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Drno, 2020-05-22
@Drno

rsync has a sync or copy command.
Set up rsync to sync directly to the backup server, and that's it. And add this command to cron

P
Puma Thailand, 2020-05-22
@opium

You ’re doing
some crap with Rsync, everything except the caliphate folder systems on the backup server without any gaskets, and even more so winscp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question