How to Backup the .qkpg folder

Backup, Restore, Netbak Replicator, Cloud Storage Services
Locked
User avatar
paolomarino
Easy as a breeze
Posts: 309
Joined: Sat Jun 13, 2009 3:24 am
Location: Ironforge

How to Backup the .qkpg folder

Post by paolomarino »

Hi.

I have two qnap nas and I made every night the backup of the shared folder from nas 1 to nas 2 using the rsync remote replication of the backup station.

I want to backup even the .qkpg folder but I cant' find it in the source folder in the backup station.

Is there any workaround to backup it ?

Thanks.
Paolo.
Happy Qnap TS-509 Ultra (Intel E7500 + 2GB RAM + 20TB WD RED) Owner :)
Happy Qnap TS-870 Ultra (Intel I7-3770T + 16GB RAM + 64TB WD RED) Owner :)
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to Backup the .qkpg folder

Post by pwilson »

paolomarino wrote:I have two qnap nas and I made every night the backup of the shared folder from nas 1 to nas 2 using the rsync remote replication of the backup station.

I want to backup even the .qkpg folder but I cant' find it in the source folder in the backup station.

Is there any workaround to backup it ?
I mitigated this problem by simply creating a "share" that points to my Apps, so that I can actually back them up:

Step 1:

Access the NAS via SSH, login as "admin" and run:

Code: Select all

addshare Apps $(dirname $(getcfg -f /etc/config/smb.conf Public path))/.qpkg
setcfg -f /etc/config/smb.conf Apps comment "NAS Apps/QPKGs"
#done
This creates the share called "Apps" that points to my pre-existing Apps area on my NAS. Check the resulting share with the command: testparm -s -l --section-name=Apps 2>/dev/null, like this:

Code: Select all

admin@NASTY2:~/bin# testparm -s -l --section-name=Apps 2>/dev/null
[Apps]
comment = NAS Apps/QPKGs	
path = /share/CACHEDEV1_DATA/.qpkg
valid users = root
	inherit permissions = Yes
	guest ok = Yes
	smb encrypt = No
	strict allocate = Yes
	oplocks = No
As you can see this creates the share correctly, but doesn't give anyone including "admin" or me ("pwilson") access to it.

Step 2:

We need to restart Samba on the NAS to pickup the change just made:

Code: Select all

/etc/init.d/smb.sh restart
To get this....

Code: Select all

admin@NASTY2:~/bin# /etc/init.d/smb.sh restart
Restarting SMB services:
Shutting down SMB services: smbd nmbd.
Shutting down winbindd services: winbindd.
locks path was set to /share/CACHEDEV1_DATA/.locks
Shutting down winbindd services: winbindd.
Starting winbindd services:Starting SMB services:.
done.
Step 3:

The "no access" issue can be resolved via a Permissions change on the Shared Folders section of the NAS Admin WebUI:

Image

Don't forget to choose: "Apply and replace all existing permissions of this folder, files, and subfolders":

Image

Apply setting, and confirm the action.

Step 4:
Check the share via SSH:

Code: Select all

testparm -s -l --section-name=Apps 2>/dev/null
[Apps]
        comment = NAS Apps/QPKGs
	path = /share/CACHEDEV1_DATA/.qpkg
	invalid users = guest
	valid users = root, admin, pwilson
	write list = admin, pwilson
	inherit permissions = Yes
	guest ok = Yes
	smb encrypt = No
	strict allocate = Yes
	oplocks = No
NB: Please note that "pwilson" and "admin" have both been added to the "write list" for the newly created Apps share.

Step 5:

Lets also check it from File Station.
I seldom use File Station myself, (as I prefer SSH :DD ), but let's look at if from File Station anyway to show you that this method works. (I'll log into File Station as "pwilson", rather than "admin" just to show off). :DD :)

Voila: Here is the output promised:

Image

Now that I can actually access my Apps share I can browse though it to copy any file I want back to my PC. Similarly I can now use Backup Station in order to Backup the entire "Apps" share, and therefore be able to "restore" my Apps as well. If I need to setup my NAS again from scratch, I can use these same instructions to re-create the "Apps" share on newly rebuilt system, and my Apps and their settings will be good to go when I restore my "Apps" share backup.

Please consider configuring this on your NAS. My code segments provided in this message are Storage Volume/Storage Pool agnostic. These same instructions should work on 95% of other peoples NAS devices, without needing to modify the code at all.

I hope you find this Tip useful for your future protection of your Apps & their settings. :DD

Please check out fribse's message thread: [HOWTO] Make automatic backup of ALL MySQL databases V3.4 for instructions on backing up your MySQL databases.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
User avatar
paolomarino
Easy as a breeze
Posts: 309
Joined: Sat Jun 13, 2009 3:24 am
Location: Ironforge

Re: How to Backup the .qkpg folder

Post by paolomarino »

pwilson wrote:
paolomarino wrote: I want to backup even the .qkpg folder but I cant' find it in the source folder in the backup station.
I mitigated this problem by simply creating a "share" that points to my Apps, so that I can actually back them up:
Works like a charm :D
Thank you very much.
Happy Qnap TS-509 Ultra (Intel E7500 + 2GB RAM + 20TB WD RED) Owner :)
Happy Qnap TS-870 Ultra (Intel I7-3770T + 16GB RAM + 64TB WD RED) Owner :)
QRocks
Starting out
Posts: 16
Joined: Thu Jun 17, 2021 12:39 am

Re: How to Backup the .qkpg folder

Post by QRocks »

Hi,
sorry for necroposting
Is there any chance to update /reupload the images ? I think it could be superuseful.
Thank you!
User avatar
dolbyman
Guru
Posts: 35273
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to Backup the .qkpg folder

Post by dolbyman »

thats why you dont necropost..pwilson died 5 or 6 years ago

marked for closure
Locked

Return to “Backup & Restore”