Menu

LuckyBackup not deleting files that were removed from a Samba share

Help
Gene S
2018-08-14
2018-09-30
  • Gene S

    Gene S - 2018-08-14

    Using Linux Mint 19.

    I have a Samba share that Windows boxes copy files into/delete files out of. When a Windows box deletes a file from the Samba share, LuckyBackup isn't deleting them from the backup location.

    Example:

    A Windows box copies a file (test.txt) to my Linux Samba share: \sambashare\windows (on Linux box)

    LB backs up that dir and file inside it.

    A day later, the Windows box accesses that share and deletes test.txt and creates test2.txt.

    When LB fires up, it backs up up test2.txt but doesn't delete test.txt from the destination.

    Any way to fix that?

     
  • Loukas Avgeriou

    Loukas Avgeriou - 2018-08-15

    Hi Gene,

    Have you selected "Backup source inside destination" as task type ?
    http://luckybackup.sourceforge.net/manual.html#OperationType

    Could you please double check that the option "delete files on the destination" is selected ?
    http://luckybackup.sourceforge.net/manual.html#OperationAdvancedOptions

    Do you get any relevant error messages during the run ?
    (eg "failed to delete ..." or "skipping file deletion")

     
    • Gene S

      Gene S - 2018-08-18

      Yes to your first question and yes to the 2nd question.

      When I was getting the problem, no relevant errors were being displayed BUT.............. I can't reproduce the problem now..... which I guess is a good thing, right? :)

      I feel pretty dumb now but thanks for taking the time to reply though!

       
  • Loukas Avgeriou

    Loukas Avgeriou - 2018-08-18

    Indeed, if the issue is not there any more we're all happy :)
    Please don't feel like that and do not hesitate to let me know if anything else comes up

     
  • steve_d

    steve_d - 2018-09-29

    I run LuckyBackup as a user, not as an admin (not as root).

    I had the same problem (LuckyBackup not deleting files in the backup that were no longer in the source, despite both "Delete files on the destination" and "Recurse into directories" being checkmarked in "Command Options" for the task), and the problem (as reported by the backup log) was an rsync error ("IO error encountered - skipping file deletion"). I'm not sure what was causing the IO error, but fixed the problem (perhaps dangerously, but with advice I found in an Internet search), by selecting a task in a profile of LuckyBackuy, clicking "Modify," clicking the "Advanced" button, clicking the "Command Options" then "User defined," and typing the option "--ignore-errors" (without the quotes), then clicking the "Add" button to the right of the text-entry field to add that option to the task.

    UPDATE-- I found the problem that was causing the rsync "IO error encountered - skipping file deletion." It was that my user home directory had one hidden directory (.dbus) that was owned by "root" instead of me. (This error was reported in the LuckyBackup log for the task.) So I removed the all-encompassing "--ignore-errors" command-option for rsync and added a custom exclude instead (LuckyBackup --> (task) --> Modify --> Advanced --> Exclude --> User Defined), adding ".dbus" (without the quotes) as a custom exclusion for the profile task that included my home directory (and all its hidden files and directories). Now, even without the rsync --ignore-errors option, LuckyBackup and rsync delete the files in the destination that are no longer present in the source.

    Basically, if you ignore and don't address any specific errors reported by LuckyBackup in its log files for a particular task within a profile, it can lead to more general rsync errors.

     

    Last edit: steve_d 2018-09-29
  • Loukas Avgeriou

    Loukas Avgeriou - 2018-09-30

    thank you for the valuable feedback xscd :)

     

Log in to post a comment.