![]() A2: If you can't do that then you can do it the ugly way on the rsync command line with rsync -e 'ssh -p number'.Here is an example that sets the port number and the user name: You can do this within the ~/.ssh/config file. A1: The easiest way is to configure your ssh client to connect the right way based on the host name you are connecting to.Q: How do I connect to an sshd on a non-standard port number or use other ssh parameters?.If you run rsync again with the * that list will not include things that are no longer there and rsync will not touch them on the target. Technical details: This is because your shell is expanding the * to a list of everything that is in there. Instead of using /path/to/dir/* just use /path/to/dir/ in your source parameter. A2: If you use a * or other wildcard in your source path rsync will not delete as you expect it to.Check your output for errors and correct them or use -force. A1: If rsync encounters any errors it aborts the deletion process.Q: Why doesn't -delete delete anything?.A3: If rsync shows ownership, group, or permission changes and you are running with -archive then you are probably writing to a filesystem (like FAT or CIFS) that does not support those attributes.Note that you will need to change that to -modify-window=3602 if you have a daylight savings time change. Use the -modify-window=2 parameter to compensate for that. The FAT filesystem can only store time stamps with 2 second resolution. A2: If rsync is showing only a timestamp difference but -times doesn't seem to help then the problem is probably that your target is FAT formatted.Note: the meaning of the output is explained in the -itemize-changes section of the rsync man page. If it shows only a timestamp difference then make sure you are running rsync with -times (or -archive which includes -times). This will prefix each file name in the output with a string telling you why rsync thinks it needs to modify that file. Q: Rsync seems to want to update file(s) even though they are all the same.However, this takes significantly more time and creates significantly more server load than LVM snapshot method. A3: Of course you can also just use the tool that comes with your database that dumps the database to a text file (mysqldump, pg_dump, etc) and then rsync backup those files.The other way is to simply shut down the database while rsync is copying it. Then do a snapshot using your LVM or filesystem tools. A2: You can get around that problem by telling the database engine to freeze the database files (lock the tables) so that they aren't being modified.Using rsync or any other file based tool on them will create an inconsistent and probably corrupt copy. Database files are constantly being updated at the block level. ![]() Note that there is no conflict resolution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |