Announcement

Collapse
No announcement yet.

Backup-kind of Question

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

    Backup-kind of Question

    First off, there is nothing broken, i just do not remember to perform said operation.
    there is some type of command line set of instructions that can function similarly to M$' ROBOCOPY, where an entire source directory can be looked into, compared with a destination directory, and copy over only the files/folders that are newer.
    (while Dolphin kindasorta has this functionality, it panics first if there is not enough space to entirely copy the source to the destination, never mind that a good 90% will not be copied due to no changes)

    Also, while M$ can focus on assigned letter per drive(s), I am aware the Linux has a more,... esoteric means of identifying drives, how do I determine the actual name of the attached usb drive?
    I know my source would be /​home/​%USERNAME%/​Documents/
    it is the destination I am confused on.

    p.s.
    Is there a -switch or something that while issuing the command to copy/backup, certain directories can be arbitrarily skipped? e.g. /home/​%USERNAME%/​Documents/​​Downloads/

    Thank you for the time taken to assist.
    HCA

    #2
    rsync would be the tool you want. In a konsole run man rsync, or use the KDE help centre and look in "Unix manual pages" "user commands" under "r". There are many, many pages on the web about rsync and giving examples for so many use cases.

    If you insert a USB drive, and you let KDE mount it, the default place it will appear is /media/user/label if the drive has a label. If it doesn't, it's a good idea to give it one, otherwise some unpleasant id is used.

    rsync can do --exclude=pattern, or --exclude-from=file_with_patterns.

    Regards, John Little

    Comment


      #3
      Originally posted by jlittle View Post
      rsync would be the tool you want. In a konsole run man rsync, or use the KDE help centre and look in "Unix manual pages" "user commands" under "r". There are many, many pages on the web about rsync and giving examples for so many use cases...
      Thank You, i will attempt to absorb the manual pages.
      Last edited by Ceyarrecks; Dec 26, 2022, 11:23 AM. Reason: added my disgust at coming for answers, only to be smugly advised "just learn EVERYTHING!"

      Comment


        #4
        Originally posted by Ceyarrecks View Post

        Thank You, i will attempt to absorb the manual pages.
        There are probably thousands of how-to pages that can help simplify some of the basics, so basic usage for what you need won't be too hard at all.
        you will easily be running circles around robocopy before you even realize it.

        If you are looking for a simple syncing sort of backup to a usb drive, you might look at the backup tool included in System Settings. It might do what you are looking for, graphically, and has a focus on USB devices as destinations, plus has good directory include/exclude options.
        It syncs, so files removed from the source do get removed on the destination, which may not be what you want. I use this as part of my overall set of backup plans.

        rsync is a more powerful tool overall.

        Comment


          #5
          2 cents worth:

          I use rsync to backup my "travel" work drive - a 2TB portable. It is labeled as "ineo" so it mounts to my 'media' folder when I plug it in. Here's the command I use from a script:

          rsync -avu --progress --delete --no-o --no-g "/media/stuart/ineo/" "/shared/Documents/ineo/"

          This copies everything from the drive into the target folder and deletes ( the --delete option ) anything I deleted off of the drive. It's the most basic way to backup. I don't need incremental or multiple backups of this drive. I just want to save the changes when I return to the office. I work off the drive even when at the office so the drive is always the primary device and the backup folder remains untouched except for when I run the script. It's a "just in case it dies" type of backup.
          Please Read Me
          Be not the first by whom the new are tried, Nor yet the last to lay the old aside. -
          Alexander Pope, An Essay on Criticism, 1711

          Comment

          Working...
          X