Create MailBox inBox & sentBox
mkdir -p /home/u3/Maildir/cur [inbox]mkdir -p /home/u3/Maildir/.Sent/cur [Sent]Mail Box ownership
# cd /home [ if mail box coppy]# chown -R mamun:mamun mamun/home/mamun/Maildir/cur [mail inbox ]/home/mamun/Maildir/.Sent/cur [send mail]SSH File Transfer from Remote to Local
- -P : Use the specified port for SSH.
- -p : Copy over the file modification and access time.
- -r : Copy directories recursively.
Keep Ownership And File Permissions Intact When Copying Files Or Directories On Linux# scp -rp Remote Copy (Full preservation) : rsync -a -e ssh /src/ user@host:/dest/
scp -pr root@192.168.10.253:/home/kamal/Maildir/cur/* /home/u1/Maildir/cur/ -->#inbox mail [ mail show Runing Time]scp -pr root@worldcm.net:/home/kamal/Maildir/.Sent/cur/* /home/kamal/Maildir/.Sent/cur/ --> # sent mail# chown -r kamal:kamal /home/kamal/Maildir/cur/ --> #[own server] Port:2233scp -P 2233 root@192.168.10.253:/home/kamal/Maildir/cur/* /home/u1/Maildir/cur/ -->#inbox mail [ mail show Runing Time]scp -P 2233 root@192.168.10.253:/home/kamal/Maildir/.Sent/cur/* /home/kamal/Maildir/.Sent/cur/ --> # sent mail ORscp -pr -P 2233 root@192.168.10.253:/home/kamal/Maildir/cur/* /home/u1/Maildir/cur/ -->#inbox mail [ mail show Runing Time]scp -pr -P 2233 root@192.168.10.253:/home/kamal/Maildir/.Sent/cur/* /home/kamal/Maildir/.Sent/cur/ --> # sent mail ---------Best---------old server to new server--------------------------rsync -aAXv --progress -e "ssh -p 1025" /home/faruq/ root@192.129.141.104:/home/faruq/ rsync -aAXv --progress -e "ssh -p 1025" /home/ root@192.129.141.104:/home/ ### With Logrsync -avz --delete --progress -e "ssh -p 1025" /home/ root@125.129.241.204:/home/ --log-file=/var/log/rsync.logrsync -avz -e "ssh -p 1025" root@192.168.1.1:/home/hamdan/Maildir/cur/ /home/hamdan/Maildir/cur/copy files 1,2,3 and 4. The command would look like below:scp file1.txt file2.txt file3.txt file4.txt user1@host1.com:/home/user1/DesktopCopy a Local File to a Remote System with the scp Command
scp file.txt remote_username@10.10.0.2:/remote/directory
SSH on the remote host is listening on a port :2322 scp -P 2322 file.txt remote_username@10.10.0.2:/remote/directoryCron Jobs
@hourly rsync -avzhe 'ssh -p 1025' root@192.168.117.2:/home/faruq/Maildir/cur/*.* /home/faruq/Maildir/cur # inbox@hourly rsync -avzhe 'ssh -p 1025' root@192.168.117.2:/home/faruq/Maildir/.Sent/cur/*.* /home/faruq/Maildir/.Sent/cur # SENT mailIF : bash: /usr/bin/scp: Argument list too long
rsync -avz -e "ssh -p 1025" root@192.168.1.1:/home/arif/Maildir/cur/* /home/arif/Maildir/cur/
Ways to rsync only newer files without existing files centos
rsync -av --update --ignore-existing source_directory/ destination_directory/
rsync -avuzr --ignore-existing /home/user/files remote_user@192.168.1.100:/tmp/files
rsync- how to add only new files centos
rsync -av --ignore-existing source_directory/ destination_directory/
rsync -avuzr --update -n /home/user/files remote_user@192.168.1.100:/tmp/files