I am working on linux server which does its backup via rsync to a cifs-mounted share on an external NAS (D-Link DNS-320). Everything worked fine on opensuse 11.4. After upgrade to opensuse 12.2, the backup script is still working, but files on the share are displayed strangely.
The share is mounted on /backup and the backups are in subfolders of directory /backup/daily. So, I would ls /backup
expect to show just the daily
folder. However, it takes a long time and finally lists the files like this:
www:~ # ls /backup
daily
\daily
\daily\2012_week44
[...]
\daily\2012_week45\home\user\Maildir\cur\1351686611.2233_0.www:2,
\daily\2012_week45\home\user\Maildir\cur\1351696819.5035_0.www:2,
\daily\2012_week45\home\user\Maildir\cur\1351698486.5356_0.www:2,S
Week 44 is the time of the upgrade.
If I do ls /backup/daily
, everything looks normal on first sight:
www:~ # ls /backup/daily
2011_week28 2012_week30 2012_week34 2012_week38 2012_week42 2012_week49
2012_week27 2012_week31 2012_week35 2012_week39 2012_week43 2012_week50
2012_week28 2012_week32 2012_week36 2012_week40 2012_week44
2012_week29 2012_week33 2012_week37 2012_week41 2012_week48
Actually, I just now noticed the week45 - week47 directories are missing.
The /etc/fstab
entry for the share looks like this:
//192.168.10.55/linux_backup /backup cifs noauto,user=linux_backup,uid=backup,gid=users 0 0
But in the backup script, it's mounted like this:
mount -t cifs //192.168.10.55/linux_backup /backup -o username=linux_backup,password=password,uid=backup,gid=users
And mount
shows its properties like this:
//192.168.10.55/linux_backup on /backup type cifs (rw,relatime,sec=ntlm,unc=\192.168.10.55\linux_backup,username=linux_backup,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.10.55,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1)
For completeness sake, here's the backup script as well:
#!/bin/bash
backup_dir="/backup/daily/"
date=`date +%Y_week%V`
backup_path=${backup_dir}/$date/
rsync="/usr/bin/rsync -auv --no-o --no-g --delete"
#mount and create dir
echo "Backup started `date`"
mount -t cifs //192.168.10.55/linux_backup /backup -o username=linux_backup,password=password,uid=backup,gid=users
mkdir -p $backup_path
chmod 700 $backup_path
#home dirs
home_src=/home/
home_dst=${backup_path}/home/
${rsync} $home_src $home_dst
#cleanup
umount /backup
echo "Backup ended `date`"
exit 0
After having written all this up, it seems to me there must have been something strange going on between week 44 and week 48, which has now mysteriously fixed itself?