Where do I go to setup Backups in new v8

Hi @bkm,
You can find the site name in the frappe-bench/site or in the currentsite.txt (in case of mutliple site)
I hope this discussion will be helpful for you

Ok, your response is to cryptic for me to locate the folder with the backups.

You state the backup files are located in:

~/frappe-bench/sites/[sitename]/private/backups

However, if I actually use the ~ symbol as the start of the path, the operating system assumes that I am referencing /home/[myuser]/ as the beginning of the path. That path does not exist in my local debian box where everything is installed. If I login as a use or if I login as root, there is no path to /frappe-bench/ if I start with the ~ symbol.

When I installed the system, I logged in as user “jmi”
This is the only user that existed on the server box aside from the root user.
Logged in as jmi, I type the following 2 commands:

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py –production

I answered the account password questions along the way, and when everything was finished with the script, I rebooted and signed into the server again as jmi

Now, when I look for the path to the frappe-bench stuff, I cannot find it and your ~ symbol does not help. Obviously when you use the ~ symbol you mean something completely different!!! Unless I know what the full path name is, I cannot find it. Just about everyone here uses that silly ~ symbol as the default start of the path, but evidently only you folks seem to know the full path.

Can anybody share the full path so I can find these files and maybe get a backup to work here?

BKM

Next Question… How exactly do I turn on the automatic backups?

BKM

And last question… How do I set or adjust backup schedule from the GUI?

BKM

~ means user home onow which u installed frappe, if u installed on jmi user, have a look at:

/home/jmi/frappe-bench/

You can setup backups on System Settings in Setup

We all try our best to help:

It is a clear follow up:

Hope this helps!

Yes, that is exactly what I did!! Here is what I see when I look in that folder:

jmi@MSD-ERP:~$ ls -la
total 1596
drwxr-xr-x 2 jmi jmi 4096 Apr 22 11:38 .
drwxr-xr-x 4 root root 4096 Apr 22 11:39 …
-rw------- 1 jmi jmi 292 Apr 24 10:00 .bash_history
-rw-r–r-- 1 jmi jmi 220 Apr 22 11:06 .bash_logout
-rw-r–r-- 1 jmi jmi 3515 Apr 22 11:06 .bashrc
-rw-r–r-- 1 root root 1595408 Nov 6 14:30 get-pip.py
-rw-r–r-- 1 jmi jmi 10677 Apr 22 11:33 install.py
-rw-r–r-- 1 jmi jmi 675 Apr 22 11:06 .profile
jmi@MSD-ERP:~$

Here it is if I use the full path name:

jmi@MSD-ERP:~$ ls -la /home/jmi
total 1596
drwxr-xr-x 2 jmi jmi 4096 Apr 22 11:38 .
drwxr-xr-x 4 root root 4096 Apr 22 11:39 …
-rw------- 1 jmi jmi 292 Apr 24 10:00 .bash_history
-rw-r–r-- 1 jmi jmi 220 Apr 22 11:06 .bash_logout
-rw-r–r-- 1 jmi jmi 3515 Apr 22 11:06 .bashrc
-rw-r–r-- 1 root root 1595408 Nov 6 14:30 get-pip.py
-rw-r–r-- 1 jmi jmi 10677 Apr 22 11:33 install.py
-rw-r–r-- 1 jmi jmi 675 Apr 22 11:06 .profile
jmi@MSD-ERP:~$

That is whay I am asking the question about the fullpath!

You can see the install.py file in my home folder, but no /frappe-bench/

There is no /frappe-bench/ folder in my home folder.

BKM

Thank you krnkris,

My frustration with the follow up link was the constant reference to the path beginning with the ~ symbol. I built the debian server from scratch locally with nothing in it except SSH server and a single user (jmi). I let the install script do EVERYTHING else and the system came up working. I could find it on the network and log in as administrator. I even setup all of the things it needed before I start the data imports. When I thought to do a backup before the imports, I could not find the installed files.

It is just that I cannot find the path to anything else that I need on the server as it is not in the jmi home folder, not in the root home folder and it is not in the root / location either. So where did it go?

There are several references to setting up the automated backup through some setup function. The problem is that even the link you pointed me toward did not say how to find this setup function. It only tells you how to redirect your automated backups to a Dropbox account.

My problem is that I cannot find anywhere how to actually setup the automated backup service.

BKM

@joEz said [quote=“JoEz, post:6, topic:22928”]
You can setup backups on System Settings in Setup
[/quote]

It appears the only thing related to backups in the System Settings is the ability to download then once they have already been run, or the ability to set the number of them the system will hold (default is 3).

There is nothing there about setting up times or frequency. There is nothing there to start a backup. There is nothing there to turn on the automatic backups.

The only thing you can do from there is download a copy of an existing backup file. Here is a screenshot of the only reference to backup in the settings:

You can see under the DATA heading, the only finction is to download backup files.
BKM

@bkm

You can manage your backups in a couple of ways

A. Manually via bench commands:

  1. bench backup or bench backup --site [SITE-NAME] or bench backup-all-sites

B. Via Crontab to automate the process since the existing method does use Crontab and you can simply modify to your requirements.

To Download the backup you can do it via the Frontend as you have posted above or you can download via FTP @ ~/frappe-bench/sites/site1.local/private/backups/

Hope this helps

Have a look at contabile for job settings

I’m in UBUNTU.

Can’t help to find the right location in DEBIAN.

Hi @bkm

frappe-bench is a folder so could you just do an ls -d from /home/jmi to check for directories rather than everything? Or more specifically, just do a cd frappe-bench (from /home/jmi) and post the error message here

Kind regards,

Thanks krnkris. Ubuntu is a Debian derivative. So you would likely have the same problem if you did it in your system. I don’t use Ubuntu because it is so bloated with graphical user interfaces stuff that it slows everything down. So, Debian with only a bash prompt is my preferred server. CentOS will be my cloud server later and it would have happened in that OS as well.

To that end, I think I figured out what happened. The install.py script evidently wants you to use it with a “–user frappe” switch. I did not do this and simply ran it with the --production switch. When the install script did not see that I was also going to create a user named frappe, it decided to create the folder in the /home directory for what would have been a frappe user. However, it did not actually create the user. /home was the past place I thought to look in my search for the /frappe-bench/ location and I found the beginning of that in /home/frappe/ even though there is no frappe user in the Debian server. Regardless, at least now I have a starting point.

This is probably something the developers should look into. It is not generally a good practice to put a named directory in the /home directory unless there is going to be a user to go along with it.

@saidsl Thank you. That has been the most complete and to the point answer to the question. The forums have many details about a Backup function that used to exist in the System Settings. This evidently went away several versions ago and everyone still refers to posts as if they were still valid. Now that I can locate the proper path to the commands and the saved backup files, I will go ahead and build my own set of crontabs to automate the backup process.

@wale Yes, I know it was a dierctory, I just did not know where it was until a few minutes ago. Please see the above reply to krnkris. The install.py script does not put things where you might expect and this makes everyone’s assumptions about where to find the directory tree , well, uhm, incorrect.

Thanks to all,

BKM

@bkm thnx for the update!

I’m using VM the UBUNTU build,
with up to 10 users. Runs smoothly.

In VM there is no graphical interfaces at all.

The VM runs well on a good chosen processor.

Backup & restore:

Goes trough a shared directory.

Indeed I had to find the right directory first as in your case.

Have a wonderful day!

@krnkris Ahh… Thank makes more sense now.

There are a lot of users doing ERPNext with the VM edition on local networks. I don’t understand the draw of that sort of platform. I guess maybe it is a little faster to deploy.

Ultimately I have to deploy on a cloud server and I think there will be many modifications along the way. I know I already have a dev team working on how to add a module to do the printing of barcode labels, so operating under a VM image is a bit to constrained for me.

In order to get everything as close as possible to the live cloud version I installed everything on a local Linux box just as it would be on the cloud server. I could probably do a VM implementation on a cloud server as well, but then I would have to pay for a full compliment of RAM on the server box to keep everything running. At least by doing a classical install, the OS can better manage the memory and it cost a little less each month for me to keep it running.

Regards,

BKM

It appears the only thing related to backups in the System Settings is the ability to download then once they have already been run, or the ability to set the number of them the system will hold (default is 3).

There is nothing there about setting up times or frequency. There is nothing there to start a backup. There is nothing there to turn on the automatic backups.

The only thing you can do from there is download a copy of an existing backup file. Here is a screenshot of the only reference to backup in the settings:

@bkm I grok your frustration finding your way in file systems

IMHO to reduce frustration ‘find’ rocks, and used with ‘grep’ the two commands are a joy

frappe@erpnext:~/frappe-bench$ cd ~
frappe@erpnext:~$ find . -name frappe-bench
./frappe-bench
frappe@erpnext:~$ find . -name backups
./frappe-bench/apps/frappe/frappe/desk/page/backups
./frappe-bench/sites/erpnext.vm/private/backups

frappe@erpnext:~/frappe-bench$ find . -name *.py | xargs grep ‘def get_hooks’
./apps/frappe/frappe/init.py:def get_hooks(hook=None, default=None, app_name=None):

Have fun and hope this helps

A VM gets one up & running fast & easy, no need to install and config on a bare os.

As well one can clone, backup and manage multiple instances…

edit: I forgot to add - one can snapshot a VM image and revert back to it - ideal for development, trials to test instance or config changes and so on…

@clarkej

Thanks John. I had not even considered the useful part of cloning VM images, but that may be just the ticket for setting up multiple instances of the system to support low data volume businesses like a family owned pet shop, and such. Where a company like Apple computers may need several dedicated cloud servers to support their data needs, a small family business can get by with a lower resource implementation and would still benefit from the full feature set that can be had from a VM instance.

Not to sure I can get away from the full OS system for my current project simply because the system resources will be taxed by the load the client will put on the system. The VM test case moved very slow when attempting to process their simulated transactions. The full OS version had no lag time.

I am still glad you gave me your thoughts, because it gives me another path to help the smaller businesses that otherwise could not afford the man-hours required to setup and configure.

Thanks,

BKM