rsync-time-backup icon indicating copy to clipboard operation
rsync-time-backup copied to clipboard

does not find prevous backup when paths have spaces in them

Open manderss99 opened this issue 6 years ago • 5 comments

macmini:bin manderss99$ rsync_tmbackup.sh "/Users/manderss99/VirtualBox VMs/Ubuntu 18.04/" "/Volumes/Backup 8TB/ManualBackup/rsync_tmbackup/Ubuntu 18.04/" find: /Volumes/Backup: No such file or directory find: 8TB/ManualBackup/rsync_tmbackup/Ubuntu: No such file or directory find: 18.04: No such file or directory rsync_tmbackup: No previous backup - creating new one. rsync_tmbackup: Creating destination /Volumes/Backup 8TB/ManualBackup/rsync_tmbackup/Ubuntu 18.04/2018-04-24-090516

manderss99 avatar Apr 24 '18 07:04 manderss99

Attaching a patch that fixes my issues with spaces in destination dir.

spaces_in_dest.txt

manderss99 avatar Apr 26 '18 11:04 manderss99

Thank for the patch. Any chance you could create a pull request with it?

laurent22 avatar Apr 26 '18 18:04 laurent22

Havent done this on github before so I might done it wrong:

created a new branch and tried to push my changes I get a permission denied error.

manderss99 avatar Apr 27 '18 06:04 manderss99

The fix didn't fix the issue. Output looks bad, results on the destination server - even worse:

 # ./rsync_tmbackup.sh --rsync-set-flags "--no-perms" /home/nikicveti/dd backupuser@x10:"/media/nikolay/Seagate Backup Plus Drive/backup"
find: ‘Backup’: No such file or directory
find: ‘Plus’: No such file or directory
find: ‘Drive/backup/’: No such file or directory
cat: '/media/nikolay/Seagate Backup Plus Drive/backup/backup.inprogress': No such file or directory
rsync_tmbackup: No previous backup - creating new one.
find: ‘Backup’: No such file or directory
find: ‘Plus’: No such file or directory
find: ‘Drive/backup/’: No such file or directory
rsync_tmbackup: Starting backup...
rsync_tmbackup: From: /home/nikicveti/dd/
rsync_tmbackup: To:   backupuser@x10:/media/nikolay/Seagate Backup Plus Drive/backup/2018-08-31-000010/
rsync_tmbackup: Running command:
rsync_tmbackup: rsync  -e 'ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --no-perms --log-file '/root/.rsync_tmbackup/2018-08-31-000012.log'  -- '/home/nikicveti/dd/' 'backupuser@x10:/media/nikolay/Seagate Backup Plus Drive/backup/2018-08-31-000010/'
Warning: Permanently added 'x10,192.168.0.10' (ECDSA) to the list of known hosts.
skipping directory .
rsync_tmbackup: Backup completed without errors.
rm: cannot remove '/media/nikolay/Seagate': Is a directory
ln: target 'Drive/backup/latest' is not a directory
rm: cannot remove '/media/nikolay/Seagate': Is a directory

Expected behavior: - test directory /home/nikicveti/dd/ to be transferred and accessible on x10:/media/nikolay/Seagate Backup Plus Drive/backup/2018-08-31-000010/

Actual results: /media/nikolay/Seagate Backup Plus Drive/backup $ ls backup.inprogress

(even though the backup script had finished before that point)

Both original & patched script, and using different quotes and escaping failed. Reproducing issue should be quite trivial... just pick any directory with spaces as target.

voyager123bg avatar Aug 30 '18 21:08 voyager123bg

@voyager123bg Your problem is not related to this GitHub repo, you must escape whitespaces with a backslash.

tyriis avatar Aug 31 '18 11:08 tyriis