I would like to make a backup of a WordPress uploads folder from a a master site to a development site.I thought I would give this code a try:cp -urp /home/my_site/public_html/wp-content/uploads/* /home/my_site/public_html/dev/wp-content/uploadsCan you confirm this is correct before I do any damage, or advise about how should I proceed with this task?
Copy a full folder to another location on the same server
linux;cp
If you want to keep in sync two folders, using the command cp is the wrong approach. It will only make a copy, that is sync only at the moment when you perform that command. It depends on your purposes, but to keep in sync two folders I would use rsync command within a cronjob Anyway, if you want to do it manually, your command is almost fine, just a little fix:cp -urp /home/my_site/public_html/wp-content/uploads/ /home/my_site/public_html/dev/wp-content/