All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
0answers
11 views

Why two folders with the same contents have different sizes? [duplicate]

I just created a copy of my music library, let's call it music_backup, and also have the original folder, called music. The backup folder was created using the trusted rsync, so no weird tools ...
1
vote
1answer
382 views

Help with script/rsync command to move file with md5 sum comparison before deleting the source file/ [closed]

Referencing this post to find and delete duplicate files based on checksum, I would like to modify the approach to perform a copy operation followed by a file integrity check on the destination file. ...
0
votes
3answers
479 views

Is there a `cp` like command for verifying data and removing files?

I have some photo files on my phone, and I am backing them up to an external drive. (Everything is mounted on a linux laptop.) I have copied the files, when I should really have mv'ed them. However, ...
1
vote
1answer
3k views

Restore directory to previous state

I have an approximately 1TB directory with subdirectories dir1. I have made an rsync backup copy dir1.back. How can I efficiently restore dir1 to the state of dir1.back - that is, replace files in ...
2
votes
2answers
422 views

Can I use the 'cp' command with the -b option, but have it fail if the backup file already exists?

I'd like to use cp -b to copy a file to a destination, possibly creating a backup file of the destination path if it already exists. But, if the backup file already exists, I'd like to have cp fail ...
2
votes
3answers
117 views

Copy a lot of files recursively leads to a heat problem on my external hard drive

The Situation: I want to copy a directory recursively to an external hard drive. The directory contains a lot of files (at least 100,000). The Problem: External hard drives tend to get quite hot ...
3
votes
1answer
175 views

cp command which partially resolves symlinks

Is there an easy way to copy a directory recursively where symlinks to external files/directories are resolved (target file is copied), but internal symlinks (pointing to files inside the copied tree) ...
2
votes
1answer
3k views

How to backup all the files that I'm copying before being overwritten?

I have a folder like this: ./folder-a/index.html ./folder-b/index.html ./folder-c/subdir/index.html ./new-content/folder-a/index.html ./new-content/folder-b/index.html ./new-content/folder-c/subdir/...
1
vote
1answer
501 views

Copy a rolling “last 2 months” of files

I have a friend who is a photographer and she has a lot of large files as a result. Our current solution is where some files are delivered to my house. I don't have the storage capability to store all ...
2
votes
0answers
1k views

Logrotate archive old log files which has date extention

Everyday a log file is created in my directory. But with time, there tend to be a lot of log files. I want to keep the latest 4 log files in .log format, and compress the rest and copy the compressed ...
1
vote
0answers
495 views

How to back-up files from nautilus retaining the time stamp?

I connected my android tablet (Asus fonepad7 me372cg) to laptop using usb cable. It showed up in nautilus in Ubuntu 13.04. I've to back-up the files in the tablet (specially the videos & photos) ...
6
votes
1answer
12k views

Symlinks and permissions in backup archives

I installed linux on another computer and I want to move my /home directory to that computer. I want to backup that directory with any file permission, symlinks etc. how should I do it? Are there any ...
18
votes
1answer
38k views

Best way to sync files - copy only EXISTING files and only if NEWER than target

I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from source directory to target but I only want to copy if the ...
0
votes
1answer
129 views

Creating the first backup

I heard that rsync isn't the best one when creating the first backup in terms of performance. Instead it is the best for the later backups. So I wonder what are some better commands for creating the ...
13
votes
5answers
19k views

How to clone/copy all file/directory attributes onto different file/directory?

I want to copy the attributes (ownership, group, ACL, extended attributes, etc.) of one directory to another but not the directory contents itself. This does not work: cp -v --attributes-only A B cp:...
8
votes
3answers
6k views

Resume interrupted copying process

How to resume securely and reliably process of copying file $A into backup location $B done with pv "$A" > "$B" or cat "$A" > "$B" ? (let's assume file $A is very big, e.g. LVM2 snapshot file) ...
7
votes
1answer
9k views

bash force copy over same file

Our sysadmin has created a backup system that creates snapshots of the hard drive. When I try to restore an older version from the snapshot: cp /path/to/snapshots/foo.bar /path/to/folder/foo.bar I ...