rsync options:
-a archive = -rlptgoD
-z compress (internet)
-u update (skip newer files): --inplace
-r recursive
-e specify the remote shell to use
-h human-readable --progress
-v verbose : You can increase verbosity using -vv or -vvv
-C automatically exclude all version control sub folders and files. e.g.: .git, .hg, .svn, etc.
--exclude-from exclude files from search (regex), preventing sending
--delete delete from remove if not in source
cron rule template:
* * * * command
The asterisks (*) correspond to specific blocks of time: Minute (0-59) Hour (0-24) Day (1-7) Month (1-12) Weekday (0-6) command
use tar to save compressed file (backup):
tar -zcvf backup1.tar.gz path/to/files/
rsync -avze ssh [email protected]:/path/to/remote/directory1 path/to/local/directory2/
ssh to connect and run script to reload/start server service - bash script on production
ssh to execute bash? deal with error so .log file? return number of success to render if completed?
- temp files
- .git
- binaries
- output files
- dev files