Announcement

Collapse
No announcement yet.

Backup to USB drive

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Backup to USB drive

    Okay, I fixed my USB problems discussed in another thread. Now I would like to back up some files. I bought a USB enclosure and a 2 TB SSD (I should have saved $50 and bought one without cache, but I bought the more expensive Samsung EVO 570 instead).

    I seem to prefer Linux Mint, although I could probably use Microsoft Backup for Windows 7. I think it still exists. Here's what I did with Mint 18.3 tonight:

    Code:
    cp * -pR "/mnt/win7-drive/users/mike/My Pictures/" "/mnt/usb-enclosure/My Pictures"
    and

    Code:
    cp * -pR "/mnt/iwn7-drive/users/mike/My Documents" "/mnt/usb-enclosure/My Documents"
    The linux copy command has a "-u" option that will not copy older files over the top of newer files. But that does not interest me. Now that I did my original backup tonight, I only want to copy those files that are newer, or those that have changed from the copy on the usb enclosure SSD.

    I MIGHT be able to use the "find" command with the "-atime" or "-ctime" or "-anewer" or "cnewer" options (which might not work, since both source and destination are NTFS partitions) to get a text list of files, or I might be able to pipe the output of the "find newer files" and copy only those files. Backups would take only a second or two that way.

    I MIGHT be able to use the fc command (linux file compare) but I think that is for comparing the bits and bytes inside the file, not the date the file was most recently accessed / modified.

    I also have some familiarity with AWK, but not a whole lot.

    Or I could just use the "duplicati" add-on tool that should be available as a *.deb package in Linux Mint's repository. Starting it as a daemon (so I can access NTFS drives that ordinary user mike cannot access) should not be difficult, as long as I read up on how to do it.

    If I only copy files that are NEWER, like my family budget spreadsheet, backups will take only a few seconds.

    Any ideas? Thanks in advance !
    Last edited by Hondaman; 08-29-2024, 11:37 PM.

    #2
    RSYNC is the tool you want - it's designed to do extactly this task.
    i use
    rsync -av --delete-after /home/user/ /media/user/external/backup/

    Comment

    Working...
    X