A
A
Alexey2017-10-27 08:34:54
linux
Alexey, 2017-10-27 08:34:54

How to copy files with rename in Ubuntu?

the essence of the question is:
there is a folder /srv/share for which you need to backup to the folder /srv/backup

  1. Only modified files
  2. The name of the file that falls under the condition when copying must be appended with the date
  3. Folder structure is preserved

When copying without renaming, there are no problems, the command works:
find /srv/share -type f -mtime -1 -print0 | xargs -n 1 -I % cp --parents % /srv/backup

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2017-10-27
@HeadOnFire

Have you tried incremental backups with rsync?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question