I
I
Igor2020-05-21 14:15:06
linux
Igor, 2020-05-21 14:15:06

Backup, how to set it up correctly?

Colleagues, good day.
Explain to the green one, I want to create a new virtual machine and upload the backup there and test whether the backup is successful or not, i.e. I want this backup to unfold.
How to do it?
OS : debian of my server.
Most likely I will deploy this machine (virtual on a hypervisor) on Centos, tell me how to implement it correctly? Never encountered this.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
Official account of the Timeweb team, 2020-05-22
@whitegtr

Files can be transferred via rsync
rsync --log-file=progress_rsync -rpPvt ~/test [email protected]:/home/u/user/public_html
Command to transfer files via ssh from local directory via terminal to directory on VDS where ~/test an example of the path on the home PC, and [email protected]:/home/u/user/public_html is an example of data for connecting to the server.
To create a database dump (if there is no dump file with the .sql extension yet) when connecting via SSH to the previous server, use the command:
mysqldump -u'database' database -p'database_password' > dump_name.sql
Next, transfer the created dump with the scp command to the new one server: scp dump_name.sql l[email protected]:/home/u/user/public_html
Import the database dump into the database created on the new server with:
mysql -u'database' database -p'databasepassword' < /home/u/user/public_html/dumpname.sql

V
Vitaly Karasik, 2020-05-21
@vitaly_il1

I want to create a new virtual machine and upload backup there

What backup? Are they just data files? application? How is the backup created?

D
Dmitriy Loginov, 2020-05-22
@caramingo

What virtualization system are you planning to use?
As a rule, it is possible to make a snapshot of a virtual machine.
You do it before uploading the backup, and then you can restore it when you need it.

P
Puma Thailand, 2020-05-22
@opium

in any virtualization system there is an option to deploy backup as a whole, deploy and check

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question