Rsync upload local files without replacing remote files Rumi, May 27, 2023May 27, 2023 Disclaimer: This is basically one way sync- use at your own risk and dry run before any production deployment. Suppose you have a list of files on a remote host, some of which already exist locally. What you want is to transfer only those files that are not found locally. If you blindly run scp with wildcard, it would fetch all remote files (existing as well as non-existing files), and overwrite existing local files. You want to avoid this. In another similar situation, you may want to upload local files to a remote site, but without replacing any remote files. Using rsync: If the local and remote hosts have rsync installed, using rsync will be the easiest way to copy only new files over, since rsync is designed for incremental/differential backups. In this case, you need to explicitly tell rsync to skip any existing files during sync. Otherwise, rsync will try to use file modification time to sync two hosts, which is not what you want. To download all remote files (over SSH) while skipping existing local files: $ rsync -av --ignore-existing user@remote_host:/path/to/remote/directory/* /path/to/local/directory/ Similarly, to upload all local files (over SSH) without overwriting any duplicate remote files: $ rsync -av --ignore-existing /path/to/local/directory/* user@remote_host:/path/to/remote/directory/ Sample command- rsync -av --ignore-existing /opt/jf/tv-in/* root@123.45.67.89:/storage/tv-in Ref: https://www.xmodulo.com/skip-existing-files-scp.html Related Administrations Collected Articles Configurations (Linux) rsync
Setup Apache, FastCGI and PHP 7.4 on Ubuntu 20 May 25, 2024 Prerequisites Update the installed packages. apt update Install the Ondřej PHP repository. apt install software-properties-commonsudo add-apt-repository ppa:ondrej/php apt update Check that the repositories are correctly installed. grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* Step 1 – Install Apache apt install apache2 Related Read More
Make shinobi start up after reboot December 16, 2021 pm2 start plugins/motion/shinobi-motion.js pm2 start camera.js to start up automatically after reboot Related Read More
ZOHO Mail Client Configuration May 26, 2017 Zoho Mail can be accessed via POP/ IMAP from the standard email clients. The administrator can enable or disable the access via POP/ IMAP for the user accounts based on the organizations requirements. The POP/ IMAP configuaration details are given below: IMAP Incoming Server Name : imappro.zoho.com Port : 993… Read More