Hi all, need help please, i want to configure server to backup data using rsync and command find to backup just a new file/edit file by user.
i've been trying this command to do that:
find /resource/* -mtime 0 -exec rsync -avz '{}' /destination \;
with that command i can backup the exactly file 24 hours ago which new file/edit file by users, the issues is with that command is
/resources/ /destination/
/resources/g.xls /destination/g.xls
/resources/a/test.txt /destination/test.txt
/resources/a/c.txt /destination/c.txt
/destination/a/test.txt
/destination/a/c.txt
So, you can see above explain above it become double backup file first on top directory on destination backup, and when i add -type f on find command
to just get the file need to backup
find /resource/* -type f-mtime 0 -exec rsync -avz '{}' /destination \;
it makes the files backup just go on top of destination directory similar like:
/destination/g.xls
/destination/c.txt
/destination/test.txt
it's not make the folder to backup,
and i create some bash script using tar and it's works but the weakness using tar is slowly backup it can eat 8 hours or more time to backup.
Need help/advice please, what i need is backup using rsync to get backup just new file/edited file if i using new HDD backup cause if use new HDD Backup
it just eat some space that i have on old hdd backup but i need to backup the path of directory too cause if user complain about missing files i'm not confused to find
that files cause sometimes user forget the file they named it to their files .
Thank's a lot
