![]() ![]() It’s possible to change this behavior, and let the file be overwritten, instead, by launching the rsync daemon with the -dparam=pid‐file=FILE option. By default, the daemon launch will be aborted if the specified file already exists. This parameter is used to specify the path of a file where the rsyncd PID (Process ID) will be written. Here we will discuss some of the most interesting ones. Let’s take a quick look at some of them.Īs we just said, global parameters are those defined at the beginning of the /etc/nf file, before any module definition, or optionally inside a section. All the parameters provided inside the stanza are local, so they are applied to the related module only settings provided before any stanzas, are global. A module is associated with a directory in the filesystem, specified with the path argument. The first thing we must notice is how an rsyncd module is defined: Ī module is defined in a “stanza” which begins with the declaration of the module name between square brackets, in this case. # dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2Īll the parameters are commented, and displayed as a configuration example: they represent a good starting point for our discussion. Here is the content of the file on Fedora: # /etc/rsyncd: configuration file for The file is already included in the Archlinux and Fedora packages, while on Debian it must be created from scratch. Once rsyncd is installed, we can configure it using the /etc/nf file. The main rsync package will be installed as a dependency: In recent versions of the distribution, to install it, we can use the dnf package manager. On distributions like Fedora, instead, rsyncd, the rsync daemon, is distributed in its own package, rsync-daemon. On Archlinux, instead, we use pacman: $ sudo pacman -S rsync On Debian we can use the apt package manager: $ sudo apt-get install rsync ![]() On Debian and Archlinux, the files related to the rsync daemon are included the rsync package, so all we have to do, is to install the latter. Installing the rsync daemon is really easy, since the package and its dependencies are available by default in the all the major Linux distributions repositories. $ – requires given linux commands to be executed as a regular non-privileged user # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command No special requirements are needed to follow this tutorial Requirements, Conventions or Software Version Used Ssh "mysql $dest_db < /home/$dest_username/$dest_username.Software Requirements and Conventions Used Software Requirements and Linux Command Line Conventions Category Ssh "scp /home/$source_username/$source_db.sql RESTORE DB FILES Ssh "mysqldump $source_db > /home/$source_username/$source_db.sql" Ssh "rsync -avz -e ssh -progress /home/$source_username/public_html/ DUMP DB Ssh "virtualmin create-domain -domain $site_domain -pass $dest_pass -desc '$dest_desc' -unix -dir -webmin -web -mail -mysql -limits-from-plan -mysql-pass '$dest_sqlpass'" A little tweaking and you could just put on the source or destination servers itself.ĭest_server=".uk" This script is designed to sit on a main computer, and connect to the source and destination computers. ![]() It can be used without the Virtualmin part, just to copy files and databases. ![]() It dramatically speeds up moving websites to Virtualmin servers. Imports the database on the destination serverĪll that is left is update config files on the destination server and it’s complete.Connects to the source server via SSH to then copy the source files and database to the destination Virtualmin server.Connects to the Virtualmin server and creates the new account.We needed to move many sites from one server to a Virtualmin server, so created a simple script that:. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |