# How does it work?

**URL:** <https://forums.percona.com/t/how-does-it-work/2790>\
**Category:** Percona XtraBackup\
**Created:** [July 3, 2013, 12:51pm UTC](https://forums.percona.com/t/how-does-it-work/2790 "2013-07-03T12:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mafalb](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mafalb](https://forums.percona.com/u/mafalb)\
**Post date:** [July 3, 2013, 12:51pm UTC](https://forums.percona.com/t/how-does-it-work/2790/1 "2013-07-03T12:51:37Z")

</div>

I began reading the documentation but I am very unsure of how it is supposed to work.  
I think it is the following paragraph that is confusing me.

…snip  
XtraBackup needs to be able to connect to the database server and perform operations on the server and the [datadir](http://www.percona.com/doc/percona-xtrabackup/2.1/glossary.html#term-datadir) when creating a backup, when preparing in some scenarios and when restoring it. In order to do so, there are privileges and permission requirements on its execution that must be fulfilled.  
snap…

What I have now is a database server X to be backuped and I have a machine Y where I do dumps with mysqldump.  
I noted that innobackupex has a --host parameter so that suggests that I would install xtrabackup on Y and call it with --host=X  
But what is that datadir thing? I have no mysql server running on Y, so I have no datadir. Does it mean that I have to install a mysql server on Y? Or does it mean that I cannot do remote backups despite the --host parameter and have to install and run xtrabackup on X?

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [July 3, 2013, 3:18pm UTC](https://forums.percona.com/t/how-does-it-work/2790/2 "2013-07-03T15:18:18Z")

</div>

Xtrabackup uses cp command to copy files on filesystem level so xtrabackup needs to install where mysql is running. In your case X. However, you can transfer/stream the backup to host Y. --host is the connection parameter to connect to host via socket / TCP/IP protocol depends on the privileges on defined on mysql server.  
Here are some links for the reference,

[url][Percona XtraBackup](http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/streaming_backups_innobackupex.html%5B/url%5D)  
[url][Percona XtraBackup](http://www.percona.com/doc/percona-xtrabackup/1.6/innobackupex/remote_backups_ibk.html%5B/url%5D)  
[url][Percona Open Source Software Documentation](http://www.percona.com/docs/wiki/percona-xtrabackup:xtrabackup_howto?rev=1271039422%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![percona.jayj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/percona.jayj/32/927_2.png) [@percona.jayj](https://forums.percona.com/u/percona.jayj)\
**Post date:** [July 4, 2013, 1:14pm UTC](https://forums.percona.com/t/how-does-it-work/2790/3 "2013-07-04T13:14:32Z")

</div>

I’m not sure it uses a real ‘cp’ command for the Innodb tablespaces, because I know it does validate the checksum of each page indepdently.

mirfan is right, however. Xtrabackup must be run on the mysql server you are backing up, but it can be streamed directly over a network connection to some other server if you wish.
