moving with hardlinks + times

cause mv and cp -ar, don’t copy hardlinks on filesystems you normally have to use rsync with the --hard-links parameter to copy a directory with symlinks, hardlinks and times.
rsync uses a lot of memory, cause it’s building a big file/link table in your memory. if you try to move incremental server backups based on hardlinks, than it could be easy to save hundreds of MB in memory.
for example, if you want to move the backup directory for server1 from /backup3 to /backup4 try:

# mkdir -p /backup4/server1
# cd /backup3/server1
# find . -depth -print | cpio -pdm /backup4/server1
Be Sociable, Share!

2 Comments to “moving with hardlinks + times”

  1. By hans, 19. Juli 2010 @ 16:12

    ahh cool thing. ty

  2. By Sarah Kroner, 7. Mai 2012 @ 14:25

RSS Feed für Kommentare zu diesem Artikel. TrackBack URI

Leave a Reply