Open manderss99 opened 6 years ago
Attaching a patch that fixes my issues with spaces in destination dir.
Thank for the patch. Any chance you could create a pull request with it?
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.
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 Your problem is not related to this GitHub repo, you must escape whitespaces with a backslash.
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