Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

unRAID Server Release 6.0-beta12-x86_64 Available

Featured Replies

0 3 * * * rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

Kryspy

  • Replies 504
  • Views 137.6k
  • Created
  • Last Reply

Yeah, I add an exclude file to skip all the cache/temp files, but that's pretty much it.

 

FWIW I am a complete linux noob but using various rsync threads found here I was able to setup numerous backup jobs from various directories to various locations without too much effort.

0 3 * * * rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

Kryspy

 

OK, I want to backup /mnt/user/appdata to /mnt/user/backup/appdata_backup, I would need to run,

 

rsync -av /mnt/user/appdata/* /mnt/user/backup/appdata_backup

 

Where do I run this and how do I schedule it? how does the exclude file work?

Run it in terminal. Edit crontab which I am unsure where to edit in unraid. Maybe added to go script?!?

 

Kryspy

here is an option:

create a cache_backup.sh file in /boot/custom folder and make it executable.

 

cache_backup.sh contents.

#!/bin/bash
rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

in the go file add:

cp /boot/custom/cache_backup.sh /etc/cron.weekly

replace "cron.weekly" with "cron.hourly", "cron.daily" or "cron.monthly"

 

here is an option:

create a cache_backup.sh file in /boot/custom folder and make it executable.

 

cache_backup.sh contents.

#!/bin/bash
rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

in the go file add:

cp /boot/custom/cache_backup.sh /etc/cron.weekly

replace "cron.weekly" with "cron.hourly", "cron.daily" or "cron.monthly"

 

This is really cool, might have to give this a go later when I have time to mess around. Thanks! I still stand in the camp that these kind of forum based knowledge and script answers aren't very user friendly. Frankly I never even thought about using rsync to back up my dockers/ and app data until now. If these was a built in feature and part of the webgui, I would have been all over this on day one...

here is an option:

create a cache_backup.sh file in /boot/custom folder and make it executable.

 

cache_backup.sh contents.

#!/bin/bash
rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

in the go file add:

cp /boot/custom/cache_backup.sh /etc/cron.weekly

replace "cron.weekly" with "cron.hourly", "cron.daily" or "cron.monthly"

 

OK, I've got my appdata_backup.sh file created, but I must want to check 2 things, my flash drive doesn't have a /boot/custom folder, is this a folder named custom in the root of the flash drive?

 

I have created the file how do I make it executable? once I've copied the file to the flash drive and modified the go file can I manually start a backup from the command line?

here is an option:

create a cache_backup.sh file in /boot/custom folder and make it executable.

 

cache_backup.sh contents.

#!/bin/bash
rsync -av /mnt/docker/appdata/xxxxxx /mnt/user/docker_backup/

 

in the go file add:

cp /boot/custom/cache_backup.sh /etc/cron.weekly

replace "cron.weekly" with "cron.hourly", "cron.daily" or "cron.monthly"

 

OK, I've got my appdata_backup.sh file created, but I must want to check 2 things, my flash drive doesn't have a /boot/custom folder, is this a folder named custom in the root of the flash drive?

 

I have created the file how do I make it executable? once I've copied the file to the flash drive and modified the go file can I manually start a backup from the command line?

 

You can create the directory and put the script in it.  The reason it has to exist on the flash under some directory is "/etc" will be recreated on reboot, so you must copy the file into the cron directories on a reboot via the go script.  The custom directory does have any special meaning.  You would make it exectable by running "chmod 755 cache_backup.sh" to set the execute bits on the file...

Do we have a current (ie, I skipped all the docker stuff until b12) docker setup guide?

 

I think I just need to setup an "image" on a drive somewhere (i'd like to do my cache so that all the spinning drives can stay spun down when they can) and then start using it? In fact, the "docker" tab in the GUI might do it all for me, I'm just not sure. I'm not trying to start a discussion about "lack of documentation", its just that its all over the place during the beta cycle, so if someone can point me to the right/current info, I will roll from there.

 

Do we have a current (ie, I skipped all the docker stuff until b12) docker setup guide?

 

I think I just need to setup an "image" on a drive somewhere (i'd like to do my cache so that all the spinning drives can stay spun down when they can) and then start using it? In fact, the "docker" tab in the GUI might do it all for me, I'm just not sure. I'm not trying to start a discussion about "lack of documentation", its just that its all over the place during the beta cycle, so if someone can point me to the right/current info, I will roll from there.

 

I was going to ask the exact same question - I have not played with 6 but I'm getting ready to take the plunge since I've just built a test machine.

 

The only thing I would add to the question is wether running a Docker container from a cache drive was required? Does the cache drive have to be a BTRFS drive? Can I also put a container on a data drive?

 

Thank you!

 

Do we have a current (ie, I skipped all the docker stuff until b12) docker setup guide?

 

I think I just need to setup an "image" on a drive somewhere (i'd like to do my cache so that all the spinning drives can stay spun down when they can) and then start using it? In fact, the "docker" tab in the GUI might do it all for me, I'm just not sure. I'm not trying to start a discussion about "lack of documentation", its just that its all over the place during the beta cycle, so if someone can point me to the right/current info, I will roll from there.

Smdion has a pretty good guide here.

 

The only thing I would add to the question is wether running a Docker container from a cache drive was required?

No..

Does the cache drive have to be a BTRFS drive?
No.

Can I also put a container on a data drive?
Yes.

Thank you!

Your welcome.

 

Your welcome.

 

Thank you so much eroz! Very helpful and you are right, smdion does have an excellent guide.

 

Two quick questions -

 

I'm trying to start docker on a "test" rig I've just setup to play and get familiar with 6 before moving my production rig to 6 and I have installed a registration key, so my system is a base install.

 

When I try and start Docker, the web page responds but nothing starts. Same thing if I try and save repositories. Is that because it on a system that is Base only?

 

Second question has to do with BTRFS - I bought a couple of SSD drives to use as cache when I moved my production rig to 6. But it looks like some users are seeing problem with BTRFS specifically, so should I skip using my two SSDs and BTRFS for now and run a single hard drive as cache, or would you suggest using my two SSDs and BTRFS?

 

Thanks again!

The only thing I would add to the question is wether running a Docker container from a cache drive was required? Does the cache drive have to be a BTRFS drive? Can I also put a container on a data drive?

There is no requirement to have a BTRFS format drive for running docker.  The Docker image file can be on any drive (and thus any of the file systems supported by v6).    The docker image file is a actually a virtual disk stored in a file that internally is formatted as BTRFS, but the fact that his is the case is invisible in normal use.

 

 

Thank you so much eroz! Very helpful and you are right, smdion does have an excellent guide.

 

Two quick questions -

 

I'm trying to start docker on a "test" rig I've just setup to play and get familiar with 6 before moving my production rig to 6 and I have installed a registration key, so my system is a base install.

 

When I try and start Docker, the web page responds but nothing starts. Same thing if I try and save repositories. Is that because it on a system that is Base only?

What is the location/path that you are using to save your docker.img and how many GB are you setting aside for it.  Also is your server connecting to the internet?  Are you able to telnet a ping a website, google?

Second question has to do with BTRFS - I bought a couple of SSD drives to use as cache when I moved my production rig to 6. But it looks like some users are seeing problem with BTRFS specifically, so should I skip using my two SSDs and BTRFS for now and run a single hard drive as cache, or would you suggest using my two SSDs and BTRFS?

 

Thanks again!

That I'm not sure about.  I haven't tried using a cache pool or ssd for my cache.  But I do have my cache drive formatted as BTRFS, so far with no problems.

 

 

Thank you so much eroz! Very helpful and you are right, smdion does have an excellent guide.

 

Two quick questions -

 

I'm trying to start docker on a "test" rig I've just setup to play and get familiar with 6 before moving my production rig to 6 and I have installed a registration key, so my system is a base install.

 

When I try and start Docker, the web page responds but nothing starts. Same thing if I try and save repositories. Is that because it on a system that is Base only?

What is the location/path that you are using to save your docker.img and how many GB are you setting aside for it.  Also is your server connecting to the internet?  Are you able to telnet a ping a website, google?

Second question has to do with BTRFS - I bought a couple of SSD drives to use as cache when I moved my production rig to 6. But it looks like some users are seeing problem with BTRFS specifically, so should I skip using my two SSDs and BTRFS for now and run a single hard drive as cache, or would you suggest using my two SSDs and BTRFS?

 

Thanks again!

That I'm not sure about.  I haven't tried using a cache pool or ssd for my cache.  But I do have my cache drive formatted as BTRFS, so far with no problems.

 

Sorry - I figured it out <blush> - I had not entered any text in the docker location text box, figuring that the "placeholder text" was the default location .... I added a location and it started right away.

 

Of course, I had also added my pro key.

 

Thanks again for your help.

 

Can xfs be used on the ssd for a cache with TRIM support?

Suggestion for you jonp change that placeholder text so  that it has "e.g." before the path so that users know it's an example, so many users get tripped up on this, I must of seen it a dozen times if not more.

Can xfs be used on the ssd for a cache with TRIM support?

 

Yes.  There is no longer a requirement for a BTRFS drive for Docker since the Docker "image" is BTRFS.

 

I have been running an XFS cache for a while.

I use a SSD drive formatted with XFS and I set up a daily cron to run trim.  There are those that say turning on 'discard' to enable trim when mounting a drive is overkill and works the SSD harder than it needs to be.

I use a SSD drive formatted with XFS and I set up a daily cron to run trim.  There are those that say turning on 'discard' to enable trim when mounting a drive is overkill and works the SSD harder than it needs to be.

Hi, pls can you post the code of your daily crown to run trim?

Suggestion for you jonp change that placeholder text so  that it has "e.g." before the path so that users know it's an example, so many users get tripped up on this, I must of seen it a dozen times if not more.

 

Good idea, I updated the placeholder text on our dev version which should get included in the next release

I use a SSD drive formatted with XFS and I set up a daily cron to run trim.  There are those that say turning on 'discard' to enable trim when mounting a drive is overkill and works the SSD harder than it needs to be.

Hi, pls can you post the code of your daily crown to run trim?

 

Put the following file on your flash drive in the 'custom' directory.

 

Trim script named 'DailyCacheTrim':

#
# Trim the SSD cache drive.
#
fstrim -v /mnt/cache | logger

 

go file entry:

#
# Set up daily SSD cache trim for unRaid cron.
#
fromdos < /boot/custom/DailyCacheTrim > /etc/cron.daily/DailyCacheTrim
chmod +x /etc/cron.daily/DailyCacheTrim

I use a SSD drive formatted with XFS and I set up a daily cron to run trim.  There are those that say turning on 'discard' to enable trim when mounting a drive is overkill and works the SSD harder than it needs to be.

Hi, pls can you post the code of your daily crown to run trim?

 

Put the following file on your flash drive in the 'custom' directory.

 

Trim script named 'DailyCacheTrim':

#
# Trim the SSD cache drive.
#
fstrim -v /mnt/cache | logger

 

go file entry:

#
# Set up daily SSD cache trim for unRaid cron.
#
fromdos < /boot/custom/DailyCacheTrim > /etc/cron.daily/DailyCacheTrim
chmod +x /etc/cron.daily/DailyCacheTrim

 

I hate having to mess with the go file... it somehow feels wrong.

 

That said I'm not familiar with the fromdos command, would this code accomplish the same thing, or is there some reason why this wouldn't work?

 

1)Create DailyCacheTrim.sh in /boot/custom/ containing

!#/bin/bash
fstrim -v /mnt/cache | logger

 

Make it executable with chmod +x

 

Then in the go file put

cp /boot/custom/DailyCacheTrim.sh /etc/cron.daily

 

On boot the go file runs the copy command and copies DailyCacheTrim.sh into the cron.daily directory where cron will then run it once a day. DailyCacheTrim.sh of course runs the trim command.

 

I'm still a learning my way around linux so perhaps there is a reason why this wouldn't work?

I use a SSD drive formatted with XFS and I set up a daily cron to run trim.  There are those that say turning on 'discard' to enable trim when mounting a drive is overkill and works the SSD harder than it needs to be.

Hi, thx for the script :).

Could you pls explain "turning on 'discard' to enable trim when mounting a drive is overkill works the SSD harder than it needs to be"? I don´t understand why trim is not recommended. Also, XFS as default does feature trim enabled, right?

Rgds.

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.