Guide: Unraid Server Backups Using LuckyBackup


Recommended Posts

  • SpencerJ changed the title to Guide: Unraid Server Backups Using LuckyBackup
  • 2 months later...
  • 2 weeks later...

Hi!

 

LuckyBackup seems awesome, and I tried using it, but it creates some strange folders in the source folder where the data is to be copied from. 

image.png.bbcdd9b3b730d1c9add22ed9ea662f1d.png

 

These folders come up as folders with no name in Unraid web ui:

image.thumb.png.a9e69890d5da877351acb9384ab65c75.png

And I can't navigate into them in the terminal. 

 

When LuckyBackup has made these folders, it keeps copying from them everytime I run the backup. 

 

Anyone know why this happens? - Needless to say, I can't really use it until I figure this out...

Link to comment
27 minutes ago, Bjørn Øyvind Halvorsen said:

These folders come up as folders with no name in Unraid web ui:

Can you please do:

ls -la

in the source and in the destination directory from a Unraid terminal?

 

Do you have snapshots enabled in luckyBackup?

  • Like 1
Link to comment

Snapshots are not enabled.

 

Screenshot from source:

image.thumb.png.fdaa12c28d91c64ecee681a22b6cbf33.png

destination:

image.thumb.png.5fc602fcfd5d6767143c783a09c54033.png

 

At first i did not think that these folders were in destination, and so I blamed LuckyBackup. I will try to remove these folders in destination too, and run luckybackup again.... 

 

I realize that I don't know how these files are created though, but when they are, LuckyBackup keeps copying from them, over and over again, without any changes. I will updated you when I have tried removing all of these files and run the backup again

 

Edited by Bjørn Øyvind Halvorsen
  • Thanks 1
Link to comment

Ok... so.

 

There's two unraid servers. Destination and Source. All the files were initially on Source. Luckybackup runs in a docker on Destination. 

We connect through SSH. 

 

My theory:

 

The first time it copies, it moves all files from Source to Destination, and it gets confused by æøåéçã and so on. Because of this confusion it creates folders like the once you have seen on the screenshots. The next time it syncs these new folders back to Destination (which I don't understand, because I thouht it was a oneway backup). Then when it's doing it's second run, it sees the folders it created and tries to copy the content, but instead of going into the strangely named folders, it goes into the folder with the correct letters, and moves these files into the folder on destination, that has the strange characters :| Then there's double. Files in Destination then has two sets of the files. One with the correctly named, and one with the one it created itself...

 

Yes. Crazy confusing. 

 

Needless to say, I'm getting afraid of LuckyBackup, and think I'll stay away from it for now.... 

Edited by Bjørn Øyvind Halvorsen
Link to comment
36 minutes ago, Bjørn Øyvind Halvorsen said:

Also... I have a folder named "2021-09-13 Linda's Baby Shower" in Source, and it copies to Destination to two folders. 

"2021-09-13 Baby Shower" and "2021-09-13 Linda's Baby Shower"

What filesystems are you using, I‘ve never seen anything like that and I also have files like you mention with ‘öäß and so on…

 

I don‘t think that luckyBackup gets confused because luckyBackup is just a frontend for rsync.

 

I will create such folders for testing and report back but this can take one or two days.

Back then when I created the container I tested a few files with Chinese and Japanese characters in it and they also work just fine.

  • Like 1
Link to comment

I have cleaned up source, so that there is no more of those magic folders now, and started a new fresh backup to Destination. If this works, something else must have created the folders in the first place, and LuckyBackup (rsync) must have done something clever with them, moving them back and forth. 

 

I am certain that LuckyBackup has moved these magic folders and content from the original folders back and forth somewhat, but I'm inclined to say that these folders were not created by LuckyBack (rsync).... 

 

I did some tests with just the correct folders, and that seemed to work fine. I'm more worried about the drwx------- folders that's owned by root... I think those are the sinners :)

EDIT: 

I forgot to answer to the filesystem question. Sorry. It's from Unraid to Unraid. So that would mean XFS on both.

It's copying from SSH to th elocal disk via the Docker..

Edited by Bjørn Øyvind Halvorsen
Link to comment
4 hours ago, Bjørn Øyvind Halvorsen said:

I did some tests with just the correct folders, and that seemed to work fine. I'm more worried about the drwx------- folders that's owned by root... I think those are the sinners :)

You can also run luckyBackup as root so that it is able to read these folder and copy the contents.

  • Like 1
Link to comment
1 hour ago, Bjørn Øyvind Halvorsen said:

After it's filled in the files, it changes the permissions.. Does that sound correct?

I‘m not too sure what you mean.

You are creating a server to server backup I think?

What permissions can‘t be changed and where? On the source or on the destination? Why do you even try to change the permissions?

What have you set or better speaking what boxes did you change in the task in luckyBackup?

What filesystem are you using?

 

This is a really weird issue that you are having, I backup my whole server to another Unraid server over SFTP and it‘s working just fine.

  • Like 1
Link to comment

It's an unraid to unraid backup yes. zfs filesystem on both servers. 

 

The permissions i was talking about is something I see that LuckyBackup/rsync is doing. not something i am doing.

just the flow of how a backup is performed. 

1. folder structure copied from source to destination. All permissions is set to root.

2. Files copied

3. When files are done copying from destination to source, the permissions on the folders on Destination is changed to "nobody" so that anyone can access them..

 

I have tried both Synchronizing and backup mode in luckybackup. I have followed the tutorial here to get SSH to work. Basically the exact same thing as here -> https://unraid.net/blog/unraid-server-backups-with-luckybackup

 

One thing I have forgotten to say is that the folders with the strange characters is not visible in Samba when viewing them from my windows computer. Also i cannot access them in the termial, unless i change the name of the folder that has the correct spelling (that i can se in Samba). When i have renamed it, i can navigate to it, but only if i write the first part of the name, and then use tab to finish the foldername. Basically what i have done then is gone through and found all of these folders, renamed the folder with the proper naming, and deleted the one with the strange characters. Now i'm trying to run luckybackup again, to an empty folder to see if everything works ok. 

 

I know it's a strange error... don't know what to tell you :) - I have a good feeling about it now though... 

Hope nobody else gets this problem... 

Edited by Bjørn Øyvind Halvorsen
  • Upvote 1
Link to comment
  • 4 weeks later...
35 minutes ago, bombs1ght said:

Let me know please what for does Unraid need a backup if the system has a parity disk? I mean only data not system (usb)

Parity only protects against single drive failure. Data loss can happen many other ways, user error, corruption, malware on systems accessing Unraid, etc.

 

Versioned backups on physically separate media is the only protection from many of those problems.

  • Like 1
Link to comment
  • 5 months later...

I had luckybackup working but then switched to 10GB card in backup server but same IP address as before and it won't work. It times out on backup server when trying to copy rsa.pub key over, logs below. Tying to delete things and redo but nothing has worked so far. Any help would be appreciated?

 

Oct 23 17:31:51 Tower sshd[27983]: Connection from 192.168.0.15 port 59962 on 192.168.0.190 port 22 rdomain ""

Oct 23 17:33:51 Tower sshd[27983]: fatal: Timeout before authentication for 192.168.0.15 port 59962

Link to comment
  • 1 month later...
  • 3 months later...

Hello.
I need to connect to the source as a rsync daemon. I can't use SSH.
In lackybackup, I specify the necessary parameters of the IP address, the user and the file with the password. But I get an error:

Quote

The --password-file option may only be used when accessing an rsync daemon. rsync error: syntax or usage error (code 1) at main.c(1543) [Receiver=3.2.3]

What am I doing wrong? Does the lackybackup know how to join the rsync daemon?

Link to comment
  • 2 months later...
  • 3 weeks later...

Hi!

I'm trying to set up a backup from my main server to my backup server using the blog above but I'm having a bit of trouble. When I run the line:
 

scp /root/.ssh/id_rsa.pub 192.168.1.9:/root/.ssh/


I get an error saying port 22: Connection refused, am I correct in saying in mangement settings within webGUI I need to set use SSH to yes should fix that issue or is there something Im missing?

I also had I another question another user mentioned to save the key under /luckybackup/.ssh/, in the next step of the blog when he copies the key to the backup server would I enter in the following line?

scp /luckybackup/.ssh/id_rsa.pub <backup server IP>:/luckybackup/.ssh/

As I dont have luckybackup on my backup server? Or would it just create the directory?

Edited by gus1234
Link to comment
  • 2 weeks later...
On 9/24/2023 at 6:43 AM, gus1234 said:

Hi!

I'm trying to set up a backup from my main server to my backup server using the blog above but I'm having a bit of trouble. When I run the line:
 

scp /root/.ssh/id_rsa.pub 192.168.1.9:/root/.ssh/


I get an error saying port 22: Connection refused, am I correct in saying in mangement settings within webGUI I need to set use SSH to yes should fix that issue or is there something Im missing?

I also had I another question another user mentioned to save the key under /luckybackup/.ssh/, in the next step of the blog when he copies the key to the backup server would I enter in the following line?

scp /luckybackup/.ssh/id_rsa.pub <backup server IP>:/luckybackup/.ssh/

As I dont have luckybackup on my backup server? Or would it just create the directory?

You will need to enable SSH on both servers.

 

SCP will not create the directory.

 

I'm not 100% sure but I feel like on your backup server you should and would instead scp /luckybackup/.ssh/id_rsa.pub <backup server IP>:/root/.ssh/

 

 

Link to comment
  • 1 month later...

SOLVED: Formatted the external drive from exFAT to NTFS. Then under Advanced tab, I could specify: target drive was FAT/NTFS drive. Ticked that box, worked like a charm.

================================================================

 

I'd like to get this working for a backup of my precious files (pictures and word docs) to an external USB drive. I'm getting all sorts of errors. Folders are being written, but no files.

 

I have the USB drive mounted in Docker Template, added new Container Path: /external  to /mnt/disks/TOSHIBA_EXT, it is "Read/Write - Slave" mode.

 

I went to Luckybackup console, went to /external, and can create file "touch test.txt" and the file is there. I can remove file, file disappears.

Screenshot 2023-11-17 205915.png

Edited by rutherford
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.