Backup Nethserver

Hi

I have this problem related to backup with rsync and restic, as you can see the state of latest backup is unknown.

The last backup he dit it successfully on April 26th

from April 27 to today the backup log files are empty so I don’t know what the problem is

NethServer Version: 7.9.2009
Module: Backup

On the destination for backups have been installed updates and or been rebooted since april 26?

I don’t know the destination of backup is a Synology NAS

I started the backup manually from the terminal but it remains blocked like this

[root@srv01 /]# /sbin/e-smith/backup-data -b bck_ns_restyc
Backup: bck_ns_restyc
Backup started at 2021-05-04 11:16:57

i check other customer with the same backup configuration restic and rsync to nas with nfs protocol, and I have seen that the backup has not working for several days.

i try to start manually backup restic but failed this is the log:

Backup: bck_ns_restic
Backup started at 2021-05-04 16:37:14
Pre backup scripts status: SUCCESS
using parent snapshot 3dfe3af2

Files: 46419 new, 120 changed, 660346 unmodified
Dirs: 5709 new, 53 changed, 119099 unmodified
Added to the repo: 86.639 MiB

processed 706885 files, 187.675 GiB in 1:05
snapshot 4b8cd070 saved
unable to create lock in backend: repository is already locked by PID 5133 on srv01.gessrl.com by root (UID 0, GID 0)
lock was created at 2021-04-25 20:00:05 (212h40m34.58983956s ago)
storage ID 91fdeca2
the unlock command can be used to remove stale locks
Cleanup failed
Action ‘backup-data-restic bck_ns_restic’: FAIL
Backup status: FAIL

Check if a backup process is still running. Take a look at this page where it details how you can proceed to diagnose and fix it:

ps -fp 5133
lsof -p 5133
kill 5133
restic list locks
restic unlock ... 

Restic is going to need a password to unlock a repo; you can find that password in /var/lib/nethserver/secrets/restic_<backup name>. What I end up doing to clear a lock is

killall restic
restic unlock -r /mnt/backup-<backup name>

And then enter the password when requested.

2 Likes

Hi

thanks for the answer, hi unlock the repo and now is working again, which is the cause of these locks?

UPDATE:

I check now the customer where i fix the restic problem and i saw the other task rsync is still in progress but in the log is empty.

how do i understand what is the cause of rsync blocking?

This is the last backup of rsync i try to start manually but as you can see is not complete the backup is block after the run script

Backup: bck_ns_rsync
Backup started at 2021-05-04 16:21:34
Pre backup scripts status: SUCCESS
df: ‘’: No such file or directory
rsync_tmbackup: /mnt/backup-bck_ns_rsync/srv01/backup.inprogress already exists - the previous backup failed or was interrupted. Backup will resume from there.
rsync_tmbackup: Previous backup found - doing incremental backup from /mnt/backup-bck_ns_rsync/srv01/2021-04-26-130019
rsync_tmbackup: Creating destination /mnt/backup-bck_ns_rsync/srv01/2021-05-04-162323
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-03-29-130040
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-03-30-130018
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-04-01-130019
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-04-02-130019
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-04-03-130019
rsync_tmbackup: Expiring /mnt/backup-bck_ns_rsync/srv01/2021-04-04-130019
rsync_tmbackup: Starting backup…
rsync_tmbackup: From: /
rsync_tmbackup: To: /mnt/backup-bck_ns_rsync/srv01/2021-05-04-162323/
rsync_tmbackup: Running command:
rsync_tmbackup: rsync -D --numeric-ids --links --hard-links --one-file-system --times --recursive --perms --owner --group --stats --human-readable --files-from=/tmp/_5JGZHoy7n --exclude-from=/tmp/heqDCGDWki --log-file ‘/root/.rsync_tmbackup/2021-05-04-193624.log’ --link-dest=’/mnt/backup-bck_ns_rsync/srv01/2021-04-26-130019’ – ‘/’ ‘/mnt/backup-bck_ns_rsync/srv01/2021-05-04-162323/’

@giacomo Can you help here?

Hi guys

Today another customer with the sambe backup configuration then others this time restic backup fail this is the log

Backup: bck_ns_restyc
Backup started at 2021-05-06 22:00:01
Pre backup scripts status: SUCCESS
Error while mounting Backupstation:/volume1/Bck_ns_restyc : mount.nfs: Protocol not supported at /etc/e-smith/events/actions/mount-nfs line 88.
Can’t initialize restic repository
Action ‘backup-data-restic bck_ns_restyc’: FAIL
Backup status: FAIL

Any ideas?

Which NFS protocol version?
Can their server mount it from the command line?

mount -t nfs -o nolock "nfshost:nfsshare" mountdir

[root@srv01 ~]# nfsstat -m
/mnt/backup-bck_ns_rsync from 192.168.0.4:/volume1/bck_ns_rsync
Flags: rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.1,local_lock=none,addr=192.168.0.4

the restic backup is complete without error but rsync is still running i don’t know why and this is the LOG:

Backup: bck_ns_rsync
Backup started at 2021-05-09 23:00:01
Pre backup scripts status: SKIPPED (concurrent backup is running)
df: ‘’: No such file or directory
bash /usr/bin/rsync_tmbackup -p 22 --rsync-set-flags -D --numeric-ids --links --hard-links --one-file-system --times --recursive --perms --owner --group --stats --human-readable --files-from=/tmp/bi5LddJBrG --exclude-from=/tmp/ASV9g8cdKV / /mnt/backup-bck_ns_rsync/srv01
rsync_tmbackup: [ERROR] Previous backup task is still active - aborting.
Backup failed
Action ‘backup-data-rsync bck_ns_rsync’: FAIL
Backup status: FAIL

I reboot the server and i start manually the rsync backup this is the log, it seems an error with chown

Backup: bck_ns_rsync
Backup started at 2021-05-10 13:47:02
Pre backup scripts status: SUCCESS
df: ‘’: No such file or directory
rsync_tmbackup: /mnt/backup-bck_ns_rsync/srv01/backup.inprogress already exists - the previous backup failed or was interrupted. Backup will resume from there.
rsync_tmbackup: Previous backup found - doing incremental backup from /mnt/backup-bck_ns_rsync/srv01/2021-05-05-230024
rsync_tmbackup: Creating destination /mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925
rsync_tmbackup: Starting backup…
rsync_tmbackup: From: /
rsync_tmbackup: To: /mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/
rsync_tmbackup: Running command:
rsync_tmbackup: rsync -D --numeric-ids --links --hard-links --one-file-system --times --recursive --perms --owner --group --stats --human-readable --files-from=/tmp/ILxpUKfzy4 --exclude-from=/tmp/XZA1czKpIL --log-file ‘/root/.rsync_tmbackup/2021-05-10-134925.log’ --link-dest=’/mnt/backup-bck_ns_rsync/srv01/2021-05-05-230024’ – ‘/’ ‘/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/’
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib/nethserver” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib/nethserver/ibay” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib/nethserver/ibay/Archivio” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib/nethserver/ibay/Archivio/#recycle” failed: Invalid argument (22)
rsync: chown “/mnt/backup-bck_ns_rsync/srv01/2021-05-10-134925/var/lib/nethserver/ibay/Archivio/2006” failed: Invalid argument (22)